Merge branch 'master' into crapware
This commit is contained in:
commit
c70079880f
|
@ -6,8 +6,10 @@
|
|||
*.user
|
||||
Thumbs.db
|
||||
/Bin/Debug
|
||||
/Bin/Debug64
|
||||
/Bin/Package
|
||||
/Bin/Release
|
||||
/Bin/Release64
|
||||
/build
|
||||
/Config/Project64.cache3
|
||||
/Config/Project64.cfg
|
||||
|
@ -30,5 +32,25 @@ Thumbs.db
|
|||
/Plugin/RSP/pdb
|
||||
/Plugin/RSP/RSP 1.7.dll
|
||||
/Plugin/RSP/RSP_d 1.7.dll
|
||||
/Plugin64/GFX/lib
|
||||
/Plugin64/GFX/map
|
||||
/Plugin64/GFX/pdb
|
||||
/Plugin64/GFX/PJ64Glide64.dll
|
||||
/Plugin64/GFX/PJ64Glide64_d.dll
|
||||
/Plugin64/Input/lib
|
||||
/Plugin64/Input/map
|
||||
/Plugin64/Input/pdb
|
||||
/Plugin64/Input/PJ64_NRage.dll
|
||||
/Plugin64/Input/PJ64_NRage_d.dll
|
||||
/Plugin64/RSP/lib
|
||||
/Plugin64/RSP/map
|
||||
/Plugin64/RSP/pdb
|
||||
/Plugin64/RSP/RSP 1.7.dll
|
||||
/Plugin64/RSP/RSP_d 1.7.dll
|
||||
/Source/3rd Party/wx/lib/vc_lib/msw/wx/setup.h
|
||||
/Source/3rd Party/wx/lib/vc_lib/mswd/wx/setup.h
|
||||
/Source/3rd Party/wx/lib/vc_lib/mswu/wx/msw/rcdefs.h
|
||||
/Source/3rd Party/wx/lib/vc_lib/mswu/wx/setup.h
|
||||
/Source/3rd Party/wx/lib/vc_lib/mswud/wx/msw/rcdefs.h
|
||||
/Source/3rd Party/wx/lib/vc_lib/mswud/wx/setup.h
|
||||
/Save
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,2 @@
|
|||
[default]
|
||||
ConfigFile=..\..\Config\Project64.cfg
|
|
@ -0,0 +1,2 @@
|
|||
[default]
|
||||
ConfigFile=..\..\Config\Project64.cfg
|
|
@ -182,6 +182,7 @@ Internal Name=1080 SNOWBOARDING
|
|||
alt_tex_size=1
|
||||
depthmode=0
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
optimize_texrect=1
|
||||
swapmode=2
|
||||
|
||||
|
@ -190,6 +191,7 @@ Good Name=1080 Snowboarding (JU) (M2)
|
|||
Internal Name=1080 SNOWBOARDING
|
||||
depthmode=0
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
optimize_texrect=1
|
||||
swapmode=2
|
||||
|
||||
|
@ -205,26 +207,31 @@ use_sts1_only=1
|
|||
Good Name=A Bug's Life (E)
|
||||
Internal Name=A Bug's Life
|
||||
depthmode=0
|
||||
zmode_compare_less=1
|
||||
|
||||
[2B38AEC0-6350B810-C:46]
|
||||
Good Name=A Bug's Life (F)
|
||||
Internal Name=A Bug's Life
|
||||
depthmode=0
|
||||
zmode_compare_less=1
|
||||
|
||||
[DFF227D9-0D4D8169-C:44]
|
||||
Good Name=A Bug's Life (G)
|
||||
Internal Name=A Bug's Life
|
||||
depthmode=0
|
||||
zmode_compare_less=1
|
||||
|
||||
[F63B89CE-4582D57D-C:49]
|
||||
Good Name=A Bug's Life (I)
|
||||
Internal Name=A Bug's Life
|
||||
depthmode=0
|
||||
zmode_compare_less=1
|
||||
|
||||
[82DC04FD-CF2D82F4-C:45]
|
||||
Good Name=A Bug's Life (U)
|
||||
Internal Name=A Bug's Life
|
||||
depthmode=0
|
||||
zmode_compare_less=1
|
||||
|
||||
[62F6BE95-F102D6D6-C:50]
|
||||
Good Name=AeroFighters Assault (E) (M3)
|
||||
|
@ -488,6 +495,7 @@ depthmode=1
|
|||
Good Name=Bokujou Monogatari 2 (J) (V1.0)
|
||||
Internal Name=Ϟؼޮԓɶ߀ز
|
||||
depthmode=0
|
||||
fb_smart=0
|
||||
fog=0
|
||||
zmode_compare_less=1
|
||||
|
||||
|
@ -495,6 +503,7 @@ zmode_compare_less=1
|
|||
Good Name=Bokujou Monogatari 2 (J) (V1.1) //Harvest Moon 64 JAP
|
||||
Internal Name=Ϟؼޮԓɶ߀ز
|
||||
depthmode=0
|
||||
fb_smart=0
|
||||
fog=0
|
||||
zmode_compare_less=1
|
||||
|
||||
|
@ -502,6 +511,7 @@ zmode_compare_less=1
|
|||
Good Name=Bokujou Monogatari 2 (J) (V1.2) //Harvest Moon 64 JAP
|
||||
Internal Name=Ϟؼޮԓɶ߀ز
|
||||
depthmode=0
|
||||
fb_smart=0
|
||||
fog=0
|
||||
zmode_compare_less=1
|
||||
|
||||
|
@ -831,6 +841,7 @@ Internal Name=DONKEY KONG 64
|
|||
depth_bias=64
|
||||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
lodmode=1
|
||||
|
||||
[053C89A7-A5064302-C:4A]
|
||||
|
@ -839,6 +850,7 @@ Internal Name=DONKEY KONG 64
|
|||
depth_bias=64
|
||||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
lodmode=1
|
||||
|
||||
[EC58EABF-AD7C7169-C:45]
|
||||
|
@ -847,6 +859,7 @@ Internal Name=DONKEY KONG 64
|
|||
depth_bias=64
|
||||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
lodmode=1
|
||||
|
||||
[0DD4ABAB-B5A2A91E-C:45]
|
||||
|
@ -854,6 +867,7 @@ Good Name=Donkey Kong 64 (U) (Kiosk Demo)
|
|||
Internal Name=D K DISPLAY
|
||||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
|
||||
[2C739EAC-9EF77726-C:50]
|
||||
Good Name=Doom 64 (E)
|
||||
|
@ -976,26 +990,31 @@ filtering=2
|
|||
Good Name=Excitebike 64 (E)
|
||||
Internal Name=EXCITEBIKE64
|
||||
depthmode=0
|
||||
fb_render=1
|
||||
|
||||
[861C3519-F6091CE5-C:4A]
|
||||
Good Name=Excitebike 64 (J)
|
||||
Internal Name=EXCITEBIKE64
|
||||
depthmode=0
|
||||
fb_render=1
|
||||
|
||||
[07861842-A12EBC9F-C:45]
|
||||
Good Name=Excitebike 64 (U) (V1.0)
|
||||
Internal Name=EXCITEBIKE64
|
||||
depthmode=0
|
||||
fb_render=1
|
||||
|
||||
[F9D411E3-7CB29BC0-C:45]
|
||||
Good Name=Excitebike 64 (U) (V1.1)
|
||||
Internal Name=EXCITEBIKE64
|
||||
depthmode=0
|
||||
fb_render=1
|
||||
|
||||
[AF754F7B-1DD17381-C:45]
|
||||
Good Name=Excitebike 64 (U) (Kiosk Demo)
|
||||
Internal Name=EXCITEBIKE64
|
||||
depthmode=0
|
||||
fb_render=1
|
||||
|
||||
[8E9D834E-1E8B29A9-C:50]
|
||||
Good Name=Extreme-G (E) (M5)
|
||||
|
@ -1314,6 +1333,7 @@ wrap_big_tex=1
|
|||
Good Name=Harvest Moon 64 (U)
|
||||
Internal Name=HARVESTMOON64
|
||||
depthmode=0
|
||||
fb_smart=0
|
||||
fog=0
|
||||
zmode_compare_less=1
|
||||
|
||||
|
@ -1455,7 +1475,6 @@ swapmode=2
|
|||
[E436467A-82DE8F9B-C:45]
|
||||
Good Name=Indy Racing 2000 (U)
|
||||
Internal Name=INDY RACING 2000
|
||||
fb_render=0
|
||||
fb_smart=0
|
||||
|
||||
[336364A0-06C8D5BF-C:58]
|
||||
|
@ -2325,6 +2344,7 @@ Internal Name=Perfect Dark
|
|||
decrease_fillrect_edge=1
|
||||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
filtering=1
|
||||
optimize_texrect=0
|
||||
useless_is_useless=1
|
||||
|
@ -2335,6 +2355,7 @@ Internal Name=PERFECT DARK
|
|||
decrease_fillrect_edge=1
|
||||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
filtering=1
|
||||
optimize_texrect=0
|
||||
useless_is_useless=1
|
||||
|
@ -2345,6 +2366,7 @@ Internal Name=Perfect Dark
|
|||
decrease_fillrect_edge=1
|
||||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
filtering=1
|
||||
optimize_texrect=0
|
||||
useless_is_useless=1
|
||||
|
@ -2355,6 +2377,7 @@ Internal Name=Perfect Dark
|
|||
decrease_fillrect_edge=1
|
||||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
filtering=1
|
||||
optimize_texrect=0
|
||||
useless_is_useless=1
|
||||
|
@ -2965,6 +2988,13 @@ Good Name=Shadow Man (U)
|
|||
Internal Name=Shadowman
|
||||
depthmode=0
|
||||
|
||||
[B73AB6F6-296267DD-C:45]
|
||||
Good Name=Sin & Punishment (J) [T]
|
||||
Internal Name=Sin and Punishment
|
||||
depthmode=1
|
||||
fb_clear=1
|
||||
filtering=1
|
||||
|
||||
[C2751D1A-F8C19BFF-C:50]
|
||||
Good Name=Snowboard Kids 2 (E)
|
||||
Internal Name=SNOWBOARD KIDS2
|
||||
|
@ -3252,6 +3282,7 @@ Internal Name=ZELDA MAJORA'S MASK
|
|||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_crc_mode=0
|
||||
fb_render=1
|
||||
filtering=1
|
||||
wrap_big_tex=1
|
||||
|
||||
|
@ -3261,6 +3292,7 @@ Internal Name=ZELDA MAJORA'S MASK
|
|||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_crc_mode=0
|
||||
fb_render=1
|
||||
filtering=1
|
||||
wrap_big_tex=1
|
||||
|
||||
|
@ -3270,6 +3302,7 @@ Internal Name=ZELDA MAJORA'S MASK
|
|||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_crc_mode=0
|
||||
fb_render=1
|
||||
filtering=1
|
||||
wrap_big_tex=1
|
||||
|
||||
|
@ -3279,6 +3312,7 @@ Internal Name=ZELDA MAJORA'S MASK
|
|||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_crc_mode=0
|
||||
fb_render=1
|
||||
filtering=1
|
||||
wrap_big_tex=1
|
||||
|
||||
|
@ -3288,6 +3322,7 @@ Internal Name=ZELDA MAJORA'S MASK
|
|||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_crc_mode=0
|
||||
fb_render=1
|
||||
filtering=1
|
||||
wrap_big_tex=1
|
||||
|
||||
|
@ -3297,6 +3332,7 @@ Internal Name=ZELDA MAJORA'S MASK
|
|||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_crc_mode=0
|
||||
fb_render=1
|
||||
filtering=1
|
||||
wrap_big_tex=1
|
||||
|
||||
|
@ -3306,6 +3342,7 @@ Internal Name=MAJORA'S MASK
|
|||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_crc_mode=0
|
||||
fb_render=1
|
||||
filtering=1
|
||||
wrap_big_tex=1
|
||||
|
||||
|
@ -3315,6 +3352,7 @@ Internal Name=THE LEGEND OF ZELDA
|
|||
depth_bias=60
|
||||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
filtering=1
|
||||
|
||||
[B044B569-373C1985-C:50]
|
||||
|
@ -3323,6 +3361,7 @@ Internal Name=THE LEGEND OF ZELDA
|
|||
depth_bias=60
|
||||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
filtering=1
|
||||
|
||||
[B2055FBD-0BAB4E0C-C:50]
|
||||
|
@ -3331,6 +3370,7 @@ Internal Name=THE LEGEND OF ZELDA
|
|||
depth_bias=60
|
||||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
filtering=1
|
||||
|
||||
[F3DD35BA-4152E075-C:45]
|
||||
|
@ -3339,6 +3379,7 @@ Internal Name=THE LEGEND OF ZELDA
|
|||
depth_bias=60
|
||||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
filtering=1
|
||||
|
||||
[EC7011B7-7616D72B-C:45]
|
||||
|
@ -3347,6 +3388,7 @@ Internal Name=THE LEGEND OF ZELDA
|
|||
depth_bias=60
|
||||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
filtering=1
|
||||
|
||||
[D43DA81F-021E1E19-C:45]
|
||||
|
@ -3355,6 +3397,7 @@ Internal Name=THE LEGEND OF ZELDA
|
|||
depth_bias=60
|
||||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
filtering=1
|
||||
|
||||
[693BA2AE-B7F14E9F-C:45]
|
||||
|
@ -3363,6 +3406,7 @@ Internal Name=THE LEGEND OF ZELDA
|
|||
depth_bias=60
|
||||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
filtering=1
|
||||
|
||||
[1D4136F3-AF63EEA9-C:50]
|
||||
|
@ -3371,6 +3415,7 @@ Internal Name=THE LEGEND OF ZELDA
|
|||
depth_bias=60
|
||||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
filtering=1
|
||||
|
||||
[27A3831D-B505A533-C:45]
|
||||
|
@ -3379,6 +3424,7 @@ Internal Name=ZELDA MASTER QUEST
|
|||
depth_bias=60
|
||||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
filtering=1
|
||||
|
||||
[1D4136F3-AF63EEA9-C:45]
|
||||
|
@ -3387,6 +3433,7 @@ Internal Name=ZELDA MASTER QUEST
|
|||
depth_bias=60
|
||||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
filtering=1
|
||||
|
||||
[917D18F6-69BC5453-C:45]
|
||||
|
@ -3395,6 +3442,7 @@ Internal Name=THE LEGEND OF ZELDA
|
|||
depth_bias=60
|
||||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
filtering=1
|
||||
|
||||
[F034001A-AE47ED06-C:45]
|
||||
|
@ -3403,6 +3451,7 @@ Internal Name=THE LEGEND OF ZELDA
|
|||
depth_bias=60
|
||||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
filtering=1
|
||||
|
||||
[E61CFF0A-CE1C0D71-C:50]
|
||||
|
@ -3613,6 +3662,30 @@ depthmode=1
|
|||
filtering=1
|
||||
swapmode=2
|
||||
|
||||
[CCEB3858-26952D97-C:50]
|
||||
Good Name=Toy Story 2 (E)
|
||||
zmode_compare_less=1
|
||||
|
||||
[CB93DB97-7F5C63D5-C:46]
|
||||
Good Name=Toy Story 2 (F)
|
||||
zmode_compare_less=1
|
||||
|
||||
[782A9075-E552631D-C:44]
|
||||
Good Name=Toy Story 2 (G)
|
||||
zmode_compare_less=1
|
||||
|
||||
[BC4F2AB8-AA99E32E-C:44]
|
||||
Good Name=Toy Story 2 (G) (V1.1)
|
||||
zmode_compare_less=1
|
||||
|
||||
[A150743E-CF2522CD-C:45]
|
||||
Good Name=Toy Story 2 (U)
|
||||
zmode_compare_less=1
|
||||
|
||||
[C151AD61-280FFF22-C:45]
|
||||
Good Name=Toy Story 2 (U) (V1.1)
|
||||
zmode_compare_less=1
|
||||
|
||||
[FE4B6B43-081D29A7-C:45]
|
||||
Good Name=Triple Play 2000 (U)
|
||||
Internal Name=TRIPLE PLAY 2000
|
||||
|
@ -3631,6 +3704,7 @@ Good Name=Twisted Edge Extreme Snowboarding (E)
|
|||
Internal Name=TWISTED EDGE
|
||||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
|
||||
[BBC99D32-117DAA80-C:45]
|
||||
Good Name=Twisted Edge Extreme Snowboarding (U)
|
||||
|
@ -3832,6 +3906,7 @@ Internal Name=THE MASK OF MUJURA
|
|||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_crc_mode=0
|
||||
fb_render=1
|
||||
filtering=1
|
||||
wrap_big_tex=1
|
||||
|
||||
|
@ -3841,6 +3916,7 @@ Internal Name=THE MASK OF MUJURA
|
|||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_crc_mode=0
|
||||
fb_render=1
|
||||
filtering=1
|
||||
wrap_big_tex=1
|
||||
|
||||
|
@ -3850,6 +3926,7 @@ Internal Name=ZELDA MAJORA'S MASK
|
|||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_crc_mode=0
|
||||
fb_render=1
|
||||
filtering=1
|
||||
wrap_big_tex=1
|
||||
|
||||
|
@ -3859,6 +3936,7 @@ Internal Name=THE LEGEND OF ZELDA
|
|||
depth_bias=60
|
||||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
filtering=1
|
||||
|
||||
[D43DA81F-021E1E19-C:4A]
|
||||
|
@ -3867,6 +3945,7 @@ Internal Name=THE LEGEND OF ZELDA
|
|||
depth_bias=60
|
||||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
filtering=1
|
||||
|
||||
[693BA2AE-B7F14E9F-C:4A]
|
||||
|
@ -3875,6 +3954,7 @@ Internal Name=THE LEGEND OF ZELDA
|
|||
depth_bias=60
|
||||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
filtering=1
|
||||
|
||||
[F7F52DB8-2195E636-C:4A]
|
||||
|
@ -3883,6 +3963,7 @@ Internal Name=THE LEGEND OF ZELDA
|
|||
depth_bias=60
|
||||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
filtering=1
|
||||
|
||||
[F611F4BA-C584135C-C:4A]
|
||||
|
@ -3891,6 +3972,7 @@ Internal Name=THE LEGEND OF ZELDA
|
|||
depth_bias=60
|
||||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
filtering=1
|
||||
|
||||
[F43B45BA-2F0E9B6F-C:4A]
|
||||
|
@ -3899,6 +3981,7 @@ Internal Name=THE LEGEND OF ZELDA
|
|||
depth_bias=60
|
||||
depthmode=1
|
||||
fb_clear=1
|
||||
fb_render=1
|
||||
filtering=1
|
||||
|
||||
//================ PD ================
|
||||
|
|
|
@ -4,9 +4,9 @@ Auto Sleep=0
|
|||
Basic Mode=0
|
||||
Cheats=..\..\Config\Project64.cht
|
||||
ExtInfo=..\..\Config\Project64.rdx
|
||||
Glide64RDB=..\..\Config\Glide64.rdb
|
||||
Notes=..\..\Config\Project64.rdn
|
||||
RomDatabase=..\..\Config\Project64.rdb
|
||||
Glide64RDB=..\..\Config\Glide64.rdb
|
||||
RomListCache=..\..\Config\Project64.cache3
|
||||
ShortCuts=..\..\Config\Project64.sc3
|
||||
|
||||
|
@ -18,6 +18,7 @@ Instant Save=..\..\Save\
|
|||
Instant Save - Use Selected=1
|
||||
Lang=..\..\Lang
|
||||
Plugin=..\..\Plugin\
|
||||
Plugin64=..\..\Plugin64\
|
||||
Plugin - Use Selected=1
|
||||
Save=..\..\Save\
|
||||
Save - Use Selected=1
|
||||
|
|
3745
Config/Project64.cht
3745
Config/Project64.cht
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -16,7 +16,7 @@ An emulated RDRAM size of 8MB represents an N64 console with the 4MB memory expa
|
|||
Notes:
|
||||
- if a game supports the Expansion Pak as an option it will usually tell you in its introduction screens (usually two lines, like "Expansion Pak supported, Expansion Pak detected"). If a game doesn't support the Pak, or absolutely requires it, it probably won't say anything.
|
||||
- you gain nothing by using the Expansion Pak on a game that doesn't support it - you just waste resources.
|
||||
- further, if a game has optional Expansion Pak support where the Pak is used only to raise screen resolution, it is generally recommended you set this to No, because there's no point wasting resources on higher native resolutions when the graphics are high level emulated (hence largely resolution independant) anyway, also it can often cause severe aspect ratio problems in the video plugin.
|
||||
- further, if a game has optional Expansion Pak support where the Pak is used only to raise screen resolution, it is generally recommended you set this to No, because there's no point wasting resources on higher native resolutions when the graphics are high level emulated (hence largely resolution independent) anyway, also it can often cause severe aspect ratio problems in the video plugin.
|
||||
- in rare cases, for reasons unkown to me, the Project64 video plugin requires the Expansion Pak to avoid an Access Violation (even in games that don't use the Expansion Pak). The RDB is already set up for this for all known cases.
|
||||
- the above two points explain why the setting may sometimes appear to be logically incorrect - it has been set that way for a good reason!
|
||||
- this setting should already be correctly configured for every game by the RDB, don't change it unless you know what you're doing!
|
||||
|
@ -29,7 +29,7 @@ Save Type
|
|||
- Sram
|
||||
- FlashRam
|
||||
|
||||
You can set any of the four possible native cartridge save types here, but the only one that should be needed is 16kbit EEPROM, because it is not possible for the emulator to detect the difference between a game asking for 16kbit and a game asking for 4kbit - Project64 assumes 4kbit, the more common size. If a game actually needs 16kbit it will either fail to save or not boot unless set to 16kbit EEPROM. The other settings are included for the rare possibility that the autodetect goes wrong - generally, don't set them. Note that MemPak is treated seperately and will work in addition to whatever is selected here.
|
||||
You can set any of the four possible native cartridge save types here, but the only one that should be needed is 16kbit EEPROM, because it is not possible for the emulator to detect the difference between a game asking for 16kbit and a game asking for 4kbit - Project64 assumes 4kbit, the more common size. If a game actually needs 16kbit it will either fail to save or not boot unless set to 16kbit EEPROM. The other settings are included for the rare possibility that the autodetect goes wrong - generally, don't set them. Note that MemPak is treated separately and will work in addition to whatever is selected here.
|
||||
|
||||
Counter Factor
|
||||
--------------
|
||||
|
@ -91,7 +91,14 @@ Audio Signal
|
|||
- true
|
||||
- false (default)
|
||||
|
||||
This option has allowed for some once unsupported Musyx games like: Hydro Thunder, NBA Showtime, Disney’s Tarzan to be playable with either loading with sound available or now accessing speech although not perfect in games such as The World is Not Enough and Resident Evil 2.
|
||||
This option has allowed for some once unsupported Musyx games like: Hydro Thunder, NBA Showtime, Disney's Tarzan to be playable with either loading with sound available or now accessing speech although not perfect in games such as The World is Not Enough and Resident Evil 2.
|
||||
|
||||
AudioResetOnLoad
|
||||
----------------
|
||||
- true
|
||||
- false (default)
|
||||
|
||||
This fixes the losing audio after loading a save state issue with certain plugins in certain games.
|
||||
|
||||
**** Recompiler ****
|
||||
|
||||
|
@ -103,7 +110,7 @@ CPU Type
|
|||
|
||||
R4300i core
|
||||
|
||||
The Recompiler and Interpreter are two seperate cores in the emulator (although the Recompiler implementation is based on the Interpreter). Generally, any game that works on the Recompiler will also work on the Interpreter, but not always vice-versa. Explaining the difference between a Recompiler and an Interpreter in a general sense is beyond the scope of this document, suffficient to say that the Recompiler is (usually much) faster but (a little) less compatible, the Interpreter (usually much) slower but (a little) more compatible. If you have a fast enough PC that peformance is not an issue for you, you can probably use the Interpreter all the time, but i wouldn't recommend it since it generally shouldn't offer much advantage.
|
||||
The Recompiler and Interpreter are two separate cores in the emulator (although the Recompiler implementation is based on the Interpreter). Generally, any game that works on the Recompiler will also work on the Interpreter, but not always vice-versa. Explaining the difference between a Recompiler and an Interpreter in a general sense is beyond the scope of this document, sufficient to say that the Recompiler is (usually much) faster but (a little) less compatible, the Interpreter (usually much) slower but (a little) more compatible. If you have a fast enough PC that performance is not an issue for you, you can probably use the Interpreter all the time, but i wouldn't recommend it since it generally shouldn't offer much advantage.
|
||||
|
||||
Note that if you are using the Interpreter, the following settings are ignored (they are only relevant to the recompiler):
|
||||
|
||||
|
@ -130,28 +137,28 @@ Reg Cache
|
|||
- true (default)
|
||||
- false
|
||||
|
||||
Probably the recompiler's most significant optimisation technique, register caching usually dramatically improves the efficiency of the recompiler, and usually without side effects. The reason this is included as an option is that sometimes register caching will produce an error in a game. Register caching can cause many kinds of obscure errors, such as events in a game not triggering, or a game becoming stuck in a loop, or graphics being messed up, aswell as obvious errors such as a crash. If you find you are having stability problems with the recompiler and not the interpreter, try disabling register caching to see if you can get past the point/game with at least some of the performance of the recompiler.
|
||||
Probably the recompiler's most significant optimisation technique, register caching usually dramatically improves the efficiency of the recompiler, and usually without side effects. The reason this is included as an option is that sometimes register caching will produce an error in a game. Register caching can cause many kinds of obscure errors, such as events in a game not triggering, or a game becoming stuck in a loop, or graphics being messed up, as well as obvious errors such as a crash. If you find you are having stability problems with the recompiler and not the interpreter, try disabling register caching to see if you can get past the point/game with at least some of the performance of the recompiler.
|
||||
|
||||
Linking
|
||||
-------
|
||||
- true (default)
|
||||
- false
|
||||
|
||||
Advanced Block Linking is one of Project64's speed optimisation techniques, it usually provides a speed vs. smoothness tradeoff that you'd want to set globally (for all games) under the Geneal tab, according to whether you have a fast or slow PC. On is usually (often significantly) faster than Off but may be less smooth. This depends on the game. A few games run particularly badly with this On, or may require this to be On or Off, which is why the RDB sometimes does set this control.
|
||||
Advanced Block Linking is one of Project64's speed optimisation techniques, it usually provides a speed vs. smoothness trade-off that you'd want to set globally (for all games) under the General tab, according to whether you have a fast or slow PC. On is usually (often significantly) faster than Off but may be less smooth. This depends on the game. A few games run particularly badly with this On, or may require this to be On or Off, which is why the RDB sometimes does set this control.
|
||||
this control is a performance option for the recompiler, where setting On gives more speed (higher maximum and overall average speed) and setting Off gives better "smoothness" (higher consistency of speed, less variation from one part of a game to another, fewer jerks and slowdowns, but a lower overall speed).
|
||||
The effect of having ABL on vs. off is probably most noticeable in fast moving racing games such as Didddy Kong Racing and Mario Kart.
|
||||
|
||||
Notes:
|
||||
- Project64 game compatibility was only thoroughly tested with ABL enabled, due to time constraints. If you turn ABL off, there is a possibility that some ROMs may need their settings adjusted - occasionally a higher self-mod code method is needed. There is also a chance that some games will not work at all with ABL turned off, so be prepared to turn it back on
|
||||
- Some background info: ABL is not new to Project64 1.4+. The emulator was always using ABL, what is new in 1.4+ is the ability for you to turn it off! During the early stages of Project64 development performance was a major concern, but we expect Project64 to perform better on future PCs without ABL.
|
||||
This is NOT normally set by the RDB, therecore this control IS normally used! (unlike all the other controls on Advanced tab).
|
||||
This is NOT normally set by the RDB, therefore this control IS normally used! (unlike all the other controls on Advanced tab).
|
||||
|
||||
Fast SP
|
||||
-------
|
||||
- true (default)
|
||||
- false
|
||||
|
||||
This option was added in v1.5 simply as a performance feature - enabling it gives typically 5% more speed from the core, however a large numbe of games will not be stable with it enabled, therefore it's not set often. Try it if you are desperate for speed, but for most people most of the time it's recommended you leave it off.
|
||||
This option was added in v1.5 simply as a performance feature - enabling it gives typically 5% more speed from the core, however a large number of games will not be stable with it enabled, therefore it's not set often. Try it if you are desperate for speed, but for most people most of the time it's recommended you leave it off.
|
||||
|
||||
**** Self Mod Methods ****
|
||||
|
||||
|
@ -264,14 +271,14 @@ Resolution Height
|
|||
|
||||
This refers to the native horizontal resolution of the game. This is normally autodetected correctly by the plugin, however in some cases this can go wrong, hence this control is available to allow you to force any resolution. Values must be integers (whole numbers). A sensible place to start is 320, the horizontal resolution of most N64 games.
|
||||
|
||||
Note that this control cannot be used effectively when a game has dynamic or mixed resolition!
|
||||
Note that this control cannot be used effectively when a game has dynamic or mixed resolution!
|
||||
|
||||
Resolution Width
|
||||
----------------
|
||||
|
||||
Exactly as per "Emulated Width", except for vertical resolution, tends to be used more often to correct PAL resolution problems, and has a typical value of 240.
|
||||
|
||||
Note that this control cannot be used effectively when a game has dynamic or mixed resolition!
|
||||
Note that this control cannot be used effectively when a game has dynamic or mixed resolution!
|
||||
|
||||
Clear Frame
|
||||
-----------
|
||||
|
@ -284,7 +291,7 @@ Clear Frame
|
|||
|
||||
The default setting ("default") means none and was always used in previous versions of the plugin.
|
||||
"Only per frame" is a possible solution for games suffering from the "black layer" problem, where the whole screen is hidden behind a black layer. This was added in v1.5 for Chameleon Twist 2 and is also used for several other games.
|
||||
"Always" is a possible solution for games suffering from screen clearing problms within a particular part of the screen. It was added in v1.5 for the sky in Perfect Dark, and is also used for several other games.
|
||||
"Always" is a possible solution for games suffering from screen clearing problems within a particular part of the screen. It was added in v1.5 for the sky in Perfect Dark, and is also used for several other games.
|
||||
Non-default settings can cause problems with some games and should only be enabled if needed.
|
||||
|
||||
Self Texture
|
||||
|
@ -321,7 +328,7 @@ Culling
|
|||
- 1
|
||||
|
||||
Note: culling has been improved in v1.5 to the point where we do not know of a single game that does not benefit from it, however this control is kept in case there is something discovered.
|
||||
If unchecked, if the plugin determines that something doesn't need to be rendered it will skip the entire rendering sequence of that display list, which could take a great deal of CPU time to work through, hence you may see performance increases, but you might also see things disapear. The effectiveness of this depends on the game and the "intelligence" of the plugin.
|
||||
If unchecked, if the plugin determines that something doesn't need to be rendered it will skip the entire rendering sequence of that display list, which could take a great deal of CPU time to work through, hence you may see performance increases, but you might also see things disappear. The effectiveness of this depends on the game and the "intelligence" of the plugin.
|
||||
If checked, the plugin will draw everything in the scene regardless of whether or not it will be shown, which guarantees that nothing is culled that shouldn't be, but will take some extra CPU time, usually not a great deal more, and not an issue on fast systems, so you can turn it off.
|
||||
|
||||
#################################
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
*********************************************************************************/
|
||||
//About DLL
|
||||
#1 # "Português Brasileiro" // LANGUAGE ID
|
||||
#2 # "Lithium64" // Author
|
||||
#2 # "Project64 team" // Author
|
||||
#3 # "2.2" // Version
|
||||
#4 # "Março, 2015" // Date
|
||||
#4 # "Abril, 2015" // Date
|
||||
|
||||
//About DLL Dialog
|
||||
#5 # "Idioma Atual"
|
||||
|
@ -18,7 +18,7 @@
|
|||
#12 # "Informação Extendida da ROM (.RDX)"
|
||||
|
||||
//About INI title
|
||||
#20 # "Sobre os Arquivos INI"
|
||||
#20 # "Sobre os Arquivos de Configuração"
|
||||
|
||||
/*********************************************************************************
|
||||
* Menu *
|
||||
|
@ -60,7 +60,7 @@
|
|||
#144# "Configurar o Plugin de Áudio..."
|
||||
#145# "Configurar o Plugin do Controle..."
|
||||
#146# "Configurar o Plugin RSP..."
|
||||
#147# "Mostrar o Uso da CPU %"
|
||||
#147# "Mostrar o uso da CPU"
|
||||
#148# "&Configurações..."
|
||||
|
||||
//Debugger Menu
|
||||
|
@ -71,7 +71,7 @@
|
|||
|
||||
//Help Menu
|
||||
#180# "&Ajuda"
|
||||
#181# "Sobre os arquivos de Conf&iguração"
|
||||
#181# "Sobre os Arqui&vos de Configuração"
|
||||
#182# "&Sobre o Project 64"
|
||||
#183# "Fórum de &Suporte"
|
||||
#184# "&Homepage"
|
||||
|
@ -140,7 +140,7 @@
|
|||
#278# "Sobre o aplicativo e os autores"
|
||||
#277# "Sobre os autores dos arquivos de suporte"
|
||||
#279# "Abrir esta imagem da ROM aberta anteriormente"
|
||||
#280# "Escolher este diretório como seu diretório das roms"
|
||||
#280# "Escolher este diretório como seu diretório das ROMs"
|
||||
#281# "Mudar o Aplicativo para usar este idioma"
|
||||
#282# "Escolher este local para salvamento rápido"
|
||||
#283# "Jogar o jogo selecionado"
|
||||
|
@ -177,7 +177,7 @@
|
|||
#320# "Selecionar o diretório atual das ROMs"
|
||||
|
||||
//Messages
|
||||
#340# "ROM ruim? Use o GoodN64 & procure por um INI atualizado"
|
||||
#340# "ROM ruim? Use o GoodN64 & procure por um RDB atualizado"
|
||||
|
||||
/*********************************************************************************
|
||||
* Options *
|
||||
|
@ -194,49 +194,49 @@
|
|||
#406# "Configurações Gerais"
|
||||
#407# "Integração com o Shell"
|
||||
#408# "Notas"
|
||||
#409# "Atalhos de Teclado"
|
||||
#410# "Estado"
|
||||
#409# "Atalhos do Teclado"
|
||||
#410# "Status"
|
||||
#411# "Recompilador"
|
||||
|
||||
//Plugin Dialog
|
||||
#420# "Sobre"
|
||||
#421# " Plugin de RSP (Reality Signal Processor): "
|
||||
#421# " Plugin RSP (Reality Signal Processor): "
|
||||
#422# " Plugin de Vídeo (gráficos): "
|
||||
#423# " Plugin de Áudio (som) : "
|
||||
#424# " Plugin de Entrada (controle): "
|
||||
#425# "Usar Gráficos HLE?"
|
||||
#426# "Usar Aúdio HLE?"
|
||||
#427# "** Usar Plugin do Sistema **"
|
||||
#425# "Gráficos HLE"
|
||||
#426# "Áudio HLE"
|
||||
#427# "** Usar Plugins do Sistema **"
|
||||
|
||||
//Directory Dialog
|
||||
#440# " Diretório dos Plugins:: "
|
||||
#440# " Diretório dos Plugins: "
|
||||
#441# " Diretório das ROMs: "
|
||||
#442# " Auto saves do N64: "
|
||||
#443# " Salvamentos instantâneos: "
|
||||
#444# " Screen Shots: "
|
||||
#442# " Diretório dos saves nativos do N64: "
|
||||
#443# " Diretório dos save states: "
|
||||
#444# " Diretório das screenshots: "
|
||||
#445# "Última pasta de onde uma ROM foi aberta."
|
||||
#446# "Selecionar o diretório de plugins"
|
||||
#447# "Selecionar o diretório de roms"
|
||||
#448# "Selecionar o diretório de salvamento automático"
|
||||
#449# "Selecionar o diretório de salvamento instantâneo"
|
||||
#450# "Selecionar o diretório de capturas de tela"
|
||||
#451# " Diretório de Texturas: "
|
||||
#452# "Selecionar o diretório de texturas"
|
||||
#446# "Selecionar o diretório dos plugins"
|
||||
#447# "Selecionar o diretório das ROMs"
|
||||
#448# "Selecionar o diretório dos saves nativos do N64"
|
||||
#449# "Selecionar o diretório dos save states"
|
||||
#450# "Selecionar o diretório das screenshots"
|
||||
#451# " Diretório do pacote de texturas: "
|
||||
#452# "Selecionar o diretório do pacote de texturas"
|
||||
|
||||
//Options (general) Tab
|
||||
#460# "Pausar a emulação quando a janela não está ativa"
|
||||
#461# "Ao carregar uma ROM ir para a tela cheia"
|
||||
#462# "Esconder as Configurações Avançadas"
|
||||
#461# "Entrar em modo de tela cheia quando carregar uma ROM"
|
||||
#462# "Esconder as configurações avançadas"
|
||||
#463# "Lembrar as trapaças selecionadas"
|
||||
#464# "Desativar proteção de tela quando rodar a ROM"
|
||||
#465# "Mostrar Frame Rate"
|
||||
#466# "Mudar forma de visualização do Frame Rate:"
|
||||
#464# "Desativar a proteção de tela quando executar uma ROM"
|
||||
#465# "Exibir a velocidade"
|
||||
#466# "Forma de exibição da velocidade:"
|
||||
#467# "Verificar se o Project64 já está em execução"
|
||||
|
||||
//ROM Browser Tab
|
||||
#480# "Máx # de ROMs Lembradas (Máx 10):"
|
||||
#480# "Máx # de ROMs Lembradas (0-10):"
|
||||
#481# "ROMs"
|
||||
#482# "Máx # de Dirs. de ROMs Lembrados (Máx 10):"
|
||||
#482# "Máx # de Dirs. de ROMs Lembrados (0-10):"
|
||||
#483# "Diretórios"
|
||||
#484# "Usar Explorador de ROMs"
|
||||
#485# "Usar repetição de diretório"
|
||||
|
@ -252,59 +252,59 @@
|
|||
#500# "A maioria destas mudanças não acontecerão até que uma nova ROM seja aberta ou que a ROM atual seja resetada."
|
||||
#501# "Padrões do Core"
|
||||
#502# "Estilo do core da CPU:"
|
||||
#503# "Método do código Self-mod:"
|
||||
#504# "Tamanho Padrão da Memória:"
|
||||
#505# "Ligamento de Blocos Avançado:"
|
||||
#506# "Iniciar a Emulação quando a ROM está aberta?"
|
||||
#507# "Sempre sobrescrever as configurações padrão com as da RDB?"
|
||||
#508# "Comprimir automaticamente os salvamentos instantâneos"
|
||||
#509# "Habilitar Debugger"
|
||||
#503# "Método do código self-mod"
|
||||
#504# "Tamanho padrão da memória:"
|
||||
#505# "Ligamento de blocos avançado"
|
||||
#506# "Iniciar a emulação quando a ROM está aberta"
|
||||
#507# "Sempre sobrescrever as configurações padrão com aquelas do RDB"
|
||||
#508# "Automaticamente comprimir os save states"
|
||||
#509# "Ativar debugger"
|
||||
#510# "Cache"
|
||||
#511# "PI DMA"
|
||||
#512# "Inicio Modificado"
|
||||
#513# "Proteger a Memória"
|
||||
#513# "Proteger memória"
|
||||
#514# "TLB Não Mapeado"
|
||||
|
||||
//ROM Options
|
||||
#520# "Estilo do core da CPU:"
|
||||
#521# "Frequência de atualização da VI:"
|
||||
#522# "Tamanho da Memória:"
|
||||
#523# "Ligamento de Blocos Avançado:"
|
||||
#524# "Tipo de Salvamento Padrão:"
|
||||
#525# "Contra Fator:"
|
||||
#526# "Buffer de Compilação Maior"
|
||||
#522# "Tamanho da memória:"
|
||||
#523# "Ligamento de blocos avançado:"
|
||||
#524# "Tipo de salvamento padrão:"
|
||||
#525# "Contra fator:"
|
||||
#526# "Buffer de compilação maior"
|
||||
#527# "Usar o TLB"
|
||||
#528# "Caching do registro"
|
||||
#529# "Atrasar o SI Interrupt"
|
||||
#529# "Atrasar o SI interrupt"
|
||||
#530# "SP Rápido"
|
||||
#531# "Padrão"
|
||||
#532# "Sinal de Áudio do RSP"
|
||||
#533# "Timing de Áudio Fixo"
|
||||
#534# "Método de Função de Pesquisa:"
|
||||
#535# "Método de Self Mod Personalizado"
|
||||
#536# "Sincronizar através do Áudio"
|
||||
#537# "Contagem de IA Por Byte"
|
||||
#538# "Motor 32 Bit"
|
||||
#539# "Atrasar Interrupção DP"
|
||||
#532# "Sinal de áudio do RSP"
|
||||
#533# "Timing do áudio fixo"
|
||||
#534# "Método de procura de função:"
|
||||
#535# "Método de self-mod personalizado"
|
||||
#536# "Sincronizar usando o áudio"
|
||||
#537# "Contagem de IA por byte"
|
||||
#538# "Engine de 32 bits"
|
||||
#539# "Atrasar a interrupção do DP"
|
||||
|
||||
//Core Styles
|
||||
#540# "Interpretador"
|
||||
#541# "Recompilador"
|
||||
#542# "Sincronizar os Cores"
|
||||
#542# "Sincronizar cores"
|
||||
|
||||
//Self Mod Methods
|
||||
#560# "Nenhum"
|
||||
#561# "Cache"
|
||||
#562# "Proteger a Memória"
|
||||
#563# "Verificar a Memória & Cache"
|
||||
#564# "Mudar a Memória & Cache"
|
||||
#565# "Verificar o Avanço da Memória"
|
||||
#566# "Limpar Cógido no Cache"
|
||||
#562# "Proteger memória"
|
||||
#563# "Verificar a memória & cache"
|
||||
#564# "Mudar a memória & cache"
|
||||
#565# "Verificar o avanço da memória"
|
||||
#566# "Limpar o código no cache"
|
||||
|
||||
//Function Lookup memthod
|
||||
#570# "Tabela de Pesquisa Física"
|
||||
#571# "Tabela de Pesquisa Virtual"
|
||||
#572# "Alterar a Memória"
|
||||
//Function Lookup method
|
||||
#570# "Tabela de procura física"
|
||||
#571# "Tabela de procura virtual"
|
||||
#572# "Mudar memória"
|
||||
|
||||
//RDRAM Size
|
||||
#580# "4 MB"
|
||||
|
@ -330,18 +330,19 @@
|
|||
#662# "Nota do Plugin:"
|
||||
|
||||
// Accelerator Selector
|
||||
#680# "Estado do CPU:"
|
||||
#681# "Item do Menu:"
|
||||
#682# "Atalhos Atuais:"
|
||||
#683# "Selecionar Novo Atalho:"
|
||||
#684# "Atualmente Atribuído Ao:"
|
||||
#685# "Atribuir"
|
||||
#680# "Estado da CPU:"
|
||||
#681# "Item do menu:"
|
||||
#682# "Teclas atuais:"
|
||||
#683# "Selecionar nova tecla de atalho:"
|
||||
#684# "Atualmente designado para:"
|
||||
#685# "Designar"
|
||||
#686# "Remover"
|
||||
#687# "Restaurar Todos"
|
||||
#688# "Jogo Parado"
|
||||
#689# "Jogo em Curso"
|
||||
#690# "Jogo em Curso (janela)"
|
||||
#691# "Jogo em Curso (tela cheia)"
|
||||
#687# "Reseta Tudo"
|
||||
#688# "O jogo não está em execução"
|
||||
#689# "Jogo em execução"
|
||||
#690# "Jogo em execução (modo janela)"
|
||||
#691# "Jogo em execução (tela cheia)"
|
||||
#692# "Detectar"
|
||||
|
||||
// Frame Rate Option
|
||||
#700# "Vertical Interupts por segundo"
|
||||
|
@ -349,13 +350,14 @@
|
|||
#702# "Percentual de Velocidade"
|
||||
|
||||
// Increase speed
|
||||
#710# "Aumentar Velocidade do Jogo"
|
||||
#711# "Diminuir Velocidade do Jogo"
|
||||
#710# "Aumentar a Velocidade do Jogo"
|
||||
#711# "Diminuir a Velocidade do Jogo"
|
||||
|
||||
//Bottom Page Buttons
|
||||
//Bottom page buttons
|
||||
#720# "Resetar Página"
|
||||
#721# "Resetar Tudo"
|
||||
#722# "Aplicar"
|
||||
#723# "Fechar"
|
||||
|
||||
/*********************************************************************************
|
||||
* ROM Information *
|
||||
|
@ -365,10 +367,10 @@
|
|||
|
||||
//ROM Info Text
|
||||
#801# "Nome da ROM:"
|
||||
#802# "Nome do Arquivo:"
|
||||
#802# "Nome do arquivo:"
|
||||
#803# "Local:"
|
||||
#804# "Tamanho da ROM:"
|
||||
#805# "ID do Cartucho:"
|
||||
#805# "ID do cartucho:"
|
||||
#806# "Fabricante:"
|
||||
#807# "País:"
|
||||
#808# "CRC1:"
|
||||
|
@ -417,19 +419,19 @@
|
|||
//Edit Cheat
|
||||
#1027# "Editar a Trapaça"
|
||||
#1028# "Atualizar a Trapaça"
|
||||
#1029# "A trapaça foi mudada você quer atualizar?"
|
||||
#1030# "Trapaça Atualizada"
|
||||
#1029# "A trapaça foi mudada.\n\nVocê quer atualizar?"
|
||||
#1030# "Trapaça atualizada"
|
||||
|
||||
//Cheat Popup Menu
|
||||
#1040# "Adicionar Nova Trapaça..."
|
||||
#1041# "Editar"
|
||||
#1042# "Apagar"
|
||||
|
||||
// short cut editor
|
||||
#1100# "Restaurar Atalhos"
|
||||
#1101# "Você tem certeza que deseja rastaurar os atalhos?\n\nEsta ação não pode ser desfeita."
|
||||
#1102# "Menu de Arquivos"
|
||||
#1103# "Menu de Sistema"
|
||||
// short-cut editor
|
||||
#1100# "Resetar Atalhos"
|
||||
#1101# "Você tem certeza que deseja resetar os atalhos?\n\nEsta ação não pode ser desfeita."
|
||||
#1102# "Menu dos Arquivos"
|
||||
#1103# "Menu do Sistema"
|
||||
#1104# "Opções"
|
||||
#1105# "Slots de Salvamento"
|
||||
|
||||
|
@ -440,57 +442,57 @@
|
|||
#2001# "CPU Resumida"
|
||||
#2002# "Em um loop permanente do qual não se pode sair. \nA emulação vai parar agora. \n\nVerifique a ROM e as configurações da ROM."
|
||||
#2003# "Falha ao alocar a Memória"
|
||||
#2004# "O plugin de vídeo padrão ou selecionado está faltando ou é inválido. \n\nVocê precisa ir em Configurações e selecionar um plugin de vídeo (gráficos).\nVerifique se você tem pelo menos um arquivo de plugin compatível na sua pasta de plugins."
|
||||
#2005# "O plugin de áudio padrão ou selecionado está faltando ou é inválido. \n\nVocê precisa ir em Configurações e selecionar um plugin de áudio (som).\nVerifique se você tem pelo menos um arquivo de plugin compatível na sua pasta de plugins."
|
||||
#2006# "O plugin de RSP padrão ou selecionado está faltando ou é inválido. \n\nVocê precisa ir em Configurações e selecionar um plugin de RSP (Reality Signal Processor).\nVerifique se você tem pelo menos um arquivo de plugin compatível na sua pasta de plugins."
|
||||
#2007# "O plugin de entrada padrão ou selecionado está faltando ou é inválido. \n\nVocê precisa ir em Configurações e selecionar um plugin de vídeo (controle).\nVerifique se você tem pelo menos um arquivo de plugin compatível na sua pasta de plugins."
|
||||
#2004# "O plugin de vídeo padrão ou selecionado está faltando ou é inválido. \n\nVocê precisa ir em Configurações e selecionar um plugin de vídeo (gráficos).\nVerifique se você tem ao menos um arquivo de plugin compatível na sua pasta de plugins."
|
||||
#2005# "O plugin de áudio padrão ou selecionado está faltando ou é inválido. \n\nVocê precisa ir em Configurações e selecionar um plugin de áudio (som).\nVerifique se você tem ao menos um arquivo de plugin compatível na sua pasta de plugins."
|
||||
#2006# "O plugin de RSP padrão ou selecionado está faltando ou é inválido. \n\nVocê precisa ir em Configurações e selecionar um plugin de RSP (Reality Signal Processor).\nVerifique se você tem ao menos um arquivo de plugin compatível na sua pasta de plugins."
|
||||
#2007# "O plugin de entrada padrão ou selecionado está faltando ou é inválido. \n\nVocê precisa ir em Configurações e selecionar um plugin de entrada (controle).\nVerifique se você tem ao menos um arquivo de plugin compatível na sua pasta de plugins."
|
||||
#2008# "Falha ao carregar o plugin:"
|
||||
#2009# "Falha ao carregar a palavra\n\nVerifique a ROM e as configurações da ROM."
|
||||
#2010# "Falha ao abrir o Arquivo do Salvamento"
|
||||
#2011# "Falha ao abrir o EEPROM"
|
||||
#2012# "Falha ao abrir a flash RAM"
|
||||
#2013# "Falha ao abrir o mempak"
|
||||
#2014# "Tentativa de abrir o arquivo zip falhou. \n\nProvavelmente um arquivo zip corrompido - tente descompactar a ROM manualmente."
|
||||
#2014# "A tentativa de abrir o arquivo zip falhou. \n\nProvavelmente um arquivo zip corrompido - tente descompactar a ROM manualmente."
|
||||
#2015# "A tentativa de abrir o arquivo falhou."
|
||||
#2016# "Um erro ocorreu quando tentava abrir o arquivo zip."
|
||||
#2017# "O arquivo carregado não aparenta ser uma ROM de Nintendo 64 válida. \n\nVerifique suas ROMs com o GoodN64."
|
||||
#2017# "O arquivo carregado não aparenta ser uma ROM de N64 válida. \n\nVerifique suas ROMs com o GoodN64."
|
||||
#2018# "País desconhecido"
|
||||
#2019# "Chip Cic desconhecido"
|
||||
#2020# "Formato do arquivo desconhecido"
|
||||
#2021# "Ação de memória desconhecida/n/nEmulação parada"
|
||||
#2021# "Ação de memória desconhecida\n\nEmulação parada"
|
||||
#2022# "OpCode R4300i não manejado em"
|
||||
#2023# "Executando a partir de espaço não-mapeado. \n\nVerifique a ROM e as configurações da ROM."
|
||||
#2024# "O Save State não aparenta combinar com a ROM em execução. \n\nOs save states devem ser salvos & carregados entre ROMs 100% idênticas, \nem particular a REGIÃO e VERSÃO precisam ser as mesmas. \nCarregar este state provavelmente causaria um crash no jogo e/ou no emulador. \n\nVocê tem certeza que você quer continuar carregando?"
|
||||
#2023# "Executando do espaço não-mapeado.\n\nVerifique a ROM e as configurações da ROM."
|
||||
#2024# "Este save state não aparenta combinar com a ROM em execução. \n\nOs save states devem ser salvos & carregados entre ROMs 100% idênticas, \nEm particular a REGIÃO e VERSÃO precisam ser as mesmas. \nCarregar este state provavelmente causaria um crash no jogo e/ou no emulador. \n\nVocê tem certeza que você quer continuar carregando?"
|
||||
#2025# "Erro"
|
||||
#2026# "Sequência de Copyright não encontrada no LUT. O jogo não mais funcionará."
|
||||
#2027# "Falha da Proteção Contra Cópia"
|
||||
#2028# "Mudar um plugin requer que o Project64 resete uma ROM em execução. \nSe você não quer perder o seu local, responda Não e faça um save state primeiro. \n\nMudar os plugins e reiniciar o jogo agora?"
|
||||
#2028# "Mudar um plugin requer que o Project64 resete uma ROM em execução. \nSe você não quer perder seu lugar, responda Não e faça um save state primeiro. \n\nMudar os plugins e resetar a ROM agora?"
|
||||
#2029# "Mudar os Plugins"
|
||||
#2030# "Emulação finalizada"
|
||||
#2030# "Emulação encerrada"
|
||||
#2031# "Emulação iniciada"
|
||||
#2032# "Não é possível carregar o save state"
|
||||
#2033# "Save state carregado"
|
||||
#2034# "Salvar o state atual em"
|
||||
#2035# "Slot do save state"
|
||||
#2036# "Imagem de swapping dos bytes"
|
||||
#2032# "Incapaz de carregar o state"
|
||||
#2033# "State carregado"
|
||||
#2034# "Salvou o state atual em"
|
||||
#2035# "Slot do state"
|
||||
#2036# "Imagem de byte-swapping"
|
||||
#2037# "Escolhendo a imagem do N64"
|
||||
#2038# "Carregado"
|
||||
#2039# "Carregando a imagem"
|
||||
#2039# "Carregando imagem"
|
||||
#2040# "Não foi possível carregar a ROM porque os plugins não foram inicializados com sucesso"
|
||||
#2041# "Você tem certeza que realmente deseja excluir isto?"
|
||||
#2042# "Apagar a Trapaça"
|
||||
#2043# "O nome da trapaça já está em uso"
|
||||
#2044# "Voce alcançou a quantia máxima de trapaças para esta ROM"
|
||||
#2045# "Plug-in Inicializando"
|
||||
#2043# "O nome da trapaça já está em uso."
|
||||
#2044# "Você alcançou a quantia máxima de trapaças para esta ROM"
|
||||
#2045# "Plugin inicializando"
|
||||
#2046# "Você não selecionou uma tecla virtual para atribuir ao item de menu"
|
||||
#2047# "Você precisa selecionar um item de menu para atribuir esta tecla para"
|
||||
#2048# "Este Atalho já foi atribuído a outro item de menu"
|
||||
#2048# "O atalho foi designado a outro item do menu."
|
||||
#2049# "Nenhum atalho foi selecionado para ser removido"
|
||||
#2050# "ROM Carregada. Aguardando a emulação para começar."
|
||||
#2051# "Project64 beta é para membros apenas.\n\nSe você tem uma conta no pj64.net, você pode não ver esse erro!!\nPor favor contate-nos no website"
|
||||
#2050# "ROM carregada. Esperando a emulação iniciar."
|
||||
#2051# "O beta do Project64 é só pra membros.\n\nSe você tem uma conta no pj64.net não deveria estar vendo este erro!!\nPor favor entre em contato conosco no site."
|
||||
#2052# "Erro do Programa"
|
||||
#2053# "Não foi possível encontrar um nome de arquivo no arquivo 7z"
|
||||
#2053# "Não foi possível encontrar o nome do arquivo no arquivo 7z"
|
||||
#2054# "Gráficos LLE"
|
||||
#2055# "Gráficos LLE não são para uso geral!!!\nÉ aconselhável que você só utilize para testes, não para jogar qualquer jogo com ele\n\nMudar para Gráficos LLE?"
|
||||
#2056# "Aúdio HLE"
|
||||
#2057# "Áudio HLE requer plugin de terceiros!!!\nSe você não tem um plugin de terceiros com suporte a HLE você não vai ouvir nada.\n\nUtilizar Áudio HLE?"
|
||||
#2057# "O Áudio HLE requer um plugin de terceiros!!!\nSe você não tem um plugin de áudio de terceiros que suporta HLE você não ouvirá o som.\n\nMudar pra áudio HLE?"
|
||||
|
|
|
@ -0,0 +1,498 @@
|
|||
/*********************************************************************************
|
||||
* Meta Information *
|
||||
*********************************************************************************/
|
||||
//About DLL
|
||||
#1 # "Català" // LANGUAGE ID
|
||||
#2 # "Hiro5" // Author
|
||||
#3 # "2.2" // Version
|
||||
#4 # "11 d'octubre de 2015" // Date
|
||||
|
||||
//About DLL Dialog
|
||||
#5 # "Idioma actual"
|
||||
#6 # "Autor"
|
||||
#7 # "Versió"
|
||||
#8 # "Data"
|
||||
#9 # "Visiteu el lloc web"
|
||||
#10 # "Base de dades de ROMs (.RDB)"
|
||||
#11 # "Fitxer de Trucs (.CHT)"
|
||||
#12 # "Informació estesa de ROM (.RDX)"
|
||||
|
||||
//About INI title
|
||||
#20 # "Quant als fitxers de configuració"
|
||||
|
||||
/*********************************************************************************
|
||||
* Menu *
|
||||
*********************************************************************************/
|
||||
//File Menu
|
||||
#100# "&Fitxer"
|
||||
#101# "&Obre una ROM"
|
||||
#102# "&Informació de ROM...."
|
||||
#103# "Comença l'emulació"
|
||||
#104# "&Finalitza l'emulació"
|
||||
#105# "Tria directori de ROMs..."
|
||||
#106# "Actualitza llista de ROMs"
|
||||
#107# "ROMs recents"
|
||||
#108# "Directoris de ROMs recents"
|
||||
#109# "&Surt"
|
||||
|
||||
//System Menu
|
||||
#120# "&Sistema"
|
||||
#121# "&Reinicia"
|
||||
#122# "&Pausa"
|
||||
#123# "Captura pantalla"
|
||||
#124# "Limitador de velocitat"
|
||||
#125# "&Desa"
|
||||
#126# "Anomena i desa..."
|
||||
#127# "&Restaura"
|
||||
#128# "Carrega..."
|
||||
#129# "&Estat desat actual"
|
||||
#130# "Trucs..."
|
||||
#131# "Botó de GameShark"
|
||||
#132# "Continua"
|
||||
#133# "Reinicia el &Programari"
|
||||
#134# "Reinicia el &Maquinari"
|
||||
|
||||
//Options Menu
|
||||
#140# "&Opcions"
|
||||
#141# "&Pantalla completa"
|
||||
#142# "&Sempre a sobre"
|
||||
#143# "Configura el connector de vídeo..."
|
||||
#144# "Configura el connector d'àudio..."
|
||||
#145# "Configura el connector del controlador..."
|
||||
#146# "Configura el connector RSP..."
|
||||
#147# "Mostra % d'ús de CPU"
|
||||
#148# "&Paràmetres..."
|
||||
|
||||
//Debugger Menu
|
||||
#160# "&Depurador"
|
||||
|
||||
//Language Menu
|
||||
#175# "&Idioma"
|
||||
|
||||
//Help Menu
|
||||
#180# "&Ajuda"
|
||||
#181# "Quant als fitxers &INI"
|
||||
#182# "&Quant al Project 64"
|
||||
#183# "&Fòrum de suport"
|
||||
#184# "&Lloc web"
|
||||
|
||||
//Current Save Slot menu
|
||||
#190# "Per defecte"
|
||||
#191# "Ranura 1"
|
||||
#192# "Ranura 2"
|
||||
#193# "Ranura 3"
|
||||
#194# "Ranura 4"
|
||||
#195# "Ranura 5"
|
||||
#196# "Ranura 6"
|
||||
#197# "Ranura 7"
|
||||
#198# "Ranura 8"
|
||||
#199# "Ranura 9"
|
||||
#200# "Ranura 10"
|
||||
|
||||
//Pop up Menu
|
||||
#210# "Juga el joc"
|
||||
#211# "Informació de ROM"
|
||||
#212# "Edita els paràmetres del joc"
|
||||
#213# "Edita els trucs"
|
||||
#214# "Connector de vídeo"
|
||||
|
||||
//Alternate Name to save Slot
|
||||
#220# "Desa a la ranura per defecte"
|
||||
#221# "Desa a la ranura 1"
|
||||
#222# "Desa a la ranura 2"
|
||||
#223# "Desa a la ranura 3"
|
||||
#224# "Desa a la ranura 4"
|
||||
#225# "Desa a la ranura 5"
|
||||
#226# "Desa a la ranura 6"
|
||||
#227# "Desa a la ranura 7"
|
||||
#228# "Desa a la ranura 8"
|
||||
#229# "Desa a la ranura 9"
|
||||
#230# "Desa a la ranura 10"
|
||||
|
||||
// Menu Descriptions
|
||||
#250# "Obre una imatge ROM de Nintendo 64"
|
||||
#251# "Mostra informació de la imatge carregada"
|
||||
#252# "Inicia l'emulació de la imatge ROM carregada"
|
||||
#253# "Atura l'emulació de la imatge ROM carregada"
|
||||
#254# "Selecciona el directori de ROMs"
|
||||
#255# "Actualitza la llista de ROMs en l'explorador de ROMs"
|
||||
#256# "Tanca aquesta aplicació"
|
||||
#257# "Recarrega la imatge ROM actual (recarrega qualsevol canvi de paràmetres)"
|
||||
#258# "Pausa/Continua l'emulació de la ROM en execució actual"
|
||||
#259# "Genera una imatge Bitmap de la pantalla actual"
|
||||
#260# "Limita els quadres per segon a la velocitat correcta de la n64"
|
||||
#261# "Crea una instantània del sistema actual per un desat ràpid"
|
||||
#262# "Crea una instantània del sistema actual seleccionant la ubicació del fitxer"
|
||||
#263# "Carrega una instantània ràpida desada"
|
||||
#264# "Tria un fitxer d'instantània per carregar"
|
||||
#265# "Activa/Desactiva trucs del GameShark"
|
||||
#266# "El botó de GameShark s'utilitza amb trucs específics"
|
||||
#267# "Canvia l'emulació de mode en finestra a pantalla completa"
|
||||
#268# "Fa que la finestra estigui per sobre de totes les altres"
|
||||
#269# "Canvia els paràmetres dins del connector de vídeo"
|
||||
#270# "Canvia els paràmetres dins del connector d'àudio"
|
||||
#271# "Canvia els paràmetres dins del connector de controladors (i.e. assigna les tecles)"
|
||||
#272# "Canvia els paràmetres dins del connector RSP"
|
||||
#273# "Mostra l'ús de CPU de l'emulador dividit en diferents recursos"
|
||||
#274# "Mostra/Canvia paràmetres per aquesta aplicació"
|
||||
#275# "Mostra el Manual per l'aplicació"
|
||||
#276# "Mostra les PMF per l'aplicació"
|
||||
#278# "Quant a l'aplicació i als autors"
|
||||
#277# "Quant als autors dels fitxers de suport"
|
||||
#279# "Obre aquesta imatge de ROM oberta anteriorment"
|
||||
#280# "Tria aquest directori com el directori de ROMs"
|
||||
#281# "Canvia l'aplicació per utilitzar aquest idioma"
|
||||
#282# "Tria aquesta ubicació de desat ràpid"
|
||||
#283# "Comença el joc seleccionat"
|
||||
#284# "Informació del joc seleccionat"
|
||||
#285# "Edita els paràmetres pel joc seleccionat"
|
||||
#286# "Edita els trucs per joc seleccionat"
|
||||
|
||||
/*********************************************************************************
|
||||
* ROM Browser *
|
||||
*********************************************************************************/
|
||||
//ROM Browser Fields
|
||||
#300# "Nom de fitxer"
|
||||
#301# "Nom intern"
|
||||
#302# "Nom bo"
|
||||
#303# "Estat"
|
||||
#304# "Mida de ROM"
|
||||
#305# "Notes (Nucli)"
|
||||
#306# "Notes (complements per defecte)"
|
||||
#307# "Notes (Usuari)"
|
||||
#308# "ID de cartutx"
|
||||
#309# "Fabricant"
|
||||
#310# "País"
|
||||
#311# "Desenvolupador"
|
||||
#312# "CRC1"
|
||||
#313# "CRC2"
|
||||
#314# "Xip CIC"
|
||||
#315# "Data de sortida"
|
||||
#316# "Gènere"
|
||||
#317# "Jugadors"
|
||||
#318# "Força resposta"
|
||||
#319# "Format de fitxer"
|
||||
|
||||
//Select ROM
|
||||
#320# "Selecciona directori de ROMs actual"
|
||||
|
||||
//Messages
|
||||
#340# "ROM dolenta? Utilitza GoodN64 i cerca una RDB actualitzada"
|
||||
|
||||
/*********************************************************************************
|
||||
* Options *
|
||||
*********************************************************************************/
|
||||
//Options Title
|
||||
#400# "Paràmetres"
|
||||
|
||||
//Tabs
|
||||
#401# "Connectors"
|
||||
#402# "Directoris"
|
||||
#403# "Opcions"
|
||||
#404# "Selecció de ROM"
|
||||
#405# "Avançat"
|
||||
#406# "Paràmetres generals"
|
||||
#407# "Integració del sistema"
|
||||
#408# "Notes"
|
||||
#409# "Dreceres de teclat"
|
||||
#410# "Estat"
|
||||
#411# "Recompilador"
|
||||
|
||||
//Plugin Dialog
|
||||
#420# "Quant a"
|
||||
#421# " Complement de processador de senyal de realitat: "
|
||||
#422# " Complement de vídeo (gràfics): "
|
||||
#423# " Complement d'àudio (so): "
|
||||
#424# " Complement d'entrada (controlador): "
|
||||
#425# "HLE de vídeo"
|
||||
#426# "HLE d'àudio"
|
||||
#427# "** Utilitza complement del sistema **"
|
||||
|
||||
//Directory Dialog
|
||||
#440# " Directori de complements: "
|
||||
#441# " Directori de ROMs: "
|
||||
#442# " Autodesats de N64: "
|
||||
#443# " Instantànies: "
|
||||
#444# " Captures de pantalla: "
|
||||
#445# "Carpeta des d'on es va obrir la darrera ROM."
|
||||
#446# "Seleccioneu directori de complements"
|
||||
#447# "Seleccioneu directori de ROMs"
|
||||
#448# "Seleccioneu directori d'autodesats"
|
||||
#449# "Seleccioneu directori de desats d'instantànies"
|
||||
#450# "Seleccioneu directori d'imatges"
|
||||
#451# " Directori de paquets de textures: "
|
||||
#452# "Seleccioneu directori de paquets de textures"
|
||||
|
||||
//Options Dialog
|
||||
#460# "Posa en pausa quan la finestra no està activa"
|
||||
#461# "Canvia a pantalla completa en carregar una ROM"
|
||||
#462# "Amaga els paràmetres avançats"
|
||||
#463# "Recorda els trucs seleccionats"
|
||||
#464# "Desactiva l'estalvi de pantalla mentre s'executa una ROM"
|
||||
#465# "Mostra la velocitat"
|
||||
#466# "Mostra la velocitat:"
|
||||
#467# "Comprova si Project64 ja s'està executant"
|
||||
|
||||
//ROM Browser Tab
|
||||
#480# "Límit de ROMs recordades (Màx 10):"
|
||||
#481# "ROMs"
|
||||
#482# "Límit de Dirs de ROMs recordades (Màx 10):"
|
||||
#483# "dirs"
|
||||
#484# "Empra explorador de ROMs"
|
||||
#485# "Cerca subdirectoris"
|
||||
#486# "Camps disponibles:"
|
||||
#487# "Mostra els camps en aquest ordre:"
|
||||
#488# "Afegeix ->"
|
||||
#489# "<- Esborra"
|
||||
#490# "Amunt"
|
||||
#491# "Avall"
|
||||
#492# "Refresca el navegador automàticament"
|
||||
|
||||
//Advanced Options
|
||||
#500# "La majoria d'aquests canvis no faran efecte fins que s'obri una nova ROM o fins a reiniciar l'actual ROM."
|
||||
#501# "Predeterminats de nucli"
|
||||
#502# "Estil de nucli de CPU:"
|
||||
#503# "Mètode de codi auto-mod:"
|
||||
#504# "Mida de memòria per defecte:"
|
||||
#505# "Enllaçat de bloc avançat:"
|
||||
#506# "Iniciar l'emulació quan s'obri la ROM"
|
||||
#507# "Sobreescriu sempre els paràmetres per defecte amb els de l'INI"
|
||||
#508# "Comprimeix automàticament els estats desats"
|
||||
#509# "Activa el depurador"
|
||||
#510# "Mem. cau"
|
||||
#511# "PI DMA"
|
||||
#512# "Inici canviat"
|
||||
#513# "Memòria protegida"
|
||||
#514# "Desmapat TLB"
|
||||
|
||||
//ROM Options
|
||||
#520# "Estil de nucli de CPU:"
|
||||
#521# "Refresc d'entrada de vídeo:"
|
||||
#522# "Mida de memòria:"
|
||||
#523# "Enllaçat de blocs avançat:"
|
||||
#524# "Tipus de desat per defecte:"
|
||||
#525# "Factor de comptador:"
|
||||
#526# "Memòria de compilació més gran"
|
||||
#527# "Empra TLB"
|
||||
#528# "Registra la mem. cau"
|
||||
#529# "Retard d'interrupció SI"
|
||||
#530# "Modificació d'SP"
|
||||
#531# "Per defecte"
|
||||
#532# "Senyal d'àudio RSP"
|
||||
#533# "Sincr. d'àudio arreglada"
|
||||
#534# "Funció de mètode de cerca:"
|
||||
#535# "Mètode de codi auto-modificant"
|
||||
#536# "Sincr. utilitzant l'àudio"
|
||||
#537# "Compta AI per byte"
|
||||
#538# "Màquina 32-bit"
|
||||
#539# "Retard d'interrupció DP"
|
||||
|
||||
//Core Styles
|
||||
#540# "Intèrpret"
|
||||
#541# "Recompilador"
|
||||
#542# "Sincronitza nuclis"
|
||||
|
||||
//Self Mod Methods
|
||||
#560# "Cap"
|
||||
#561# "Mem. cau"
|
||||
#562# "Protegeix memòria"
|
||||
#563# "Comprova memòria i mem. cau"
|
||||
#564# "Canvia memòria i mem. cau"
|
||||
#565# "Comprova memòria avançada"
|
||||
#566# "Neteja codi en mem. cau"
|
||||
|
||||
//Function Lookup method
|
||||
#570# "Taula de cerca física"
|
||||
#571# "Taula de cerca virtual"
|
||||
#572# "Canvia la memòria"
|
||||
|
||||
//RDRAM Size
|
||||
#580# "4 MB"
|
||||
#581# "8 MB"
|
||||
|
||||
//Advanced Block Linking
|
||||
#600# "Encès"
|
||||
#601# "Apagat"
|
||||
|
||||
//Save Type
|
||||
#620# "Primer tipus de desat usat"
|
||||
#621# "EEPROM de 4 kbits"
|
||||
#622# "EEPROM de 16 kbits"
|
||||
#623# "SRAM de 32kbytes"
|
||||
#624# "FlashRAM de 128kbytes"
|
||||
|
||||
//Shell Integration Tab
|
||||
#640# "Associació d'extensions de fitxer:"
|
||||
|
||||
//ROM Notes
|
||||
#660# "Estat de ROM:"
|
||||
#661# "Nota de nucli:"
|
||||
#662# "Nota de complement:"
|
||||
|
||||
// Accelerator Selector
|
||||
#680# "Estat de CPU:"
|
||||
#681# "Element de menú:"
|
||||
#682# "Claus actuals:"
|
||||
#683# "Seleccioneu la nova clau de drecera:"
|
||||
#684# "Assignada actualment a:"
|
||||
#685# "Assigna"
|
||||
#686# "Esborra"
|
||||
#687# "Reinicia-ho tot"
|
||||
#688# "No s'està jugant"
|
||||
#689# "S'està jugant"
|
||||
#690# "S'està jugant en finestra"
|
||||
#691# "S'està jugant a pantalla completa"
|
||||
#692# "Detecta tecla"
|
||||
|
||||
// Frame Rate Option
|
||||
#700# "Interrupcions vertical per segon"
|
||||
#701# "Mostra llistes per segon"
|
||||
#702# "% de velocitat completa"
|
||||
|
||||
// Increase speed
|
||||
#710# "Augmenta velocitat de joc"
|
||||
#711# "Disminueix velocitat de joc"
|
||||
|
||||
//Bottom page buttons
|
||||
#720# "Reinicia pàg."
|
||||
#721# "Reinicia tot"
|
||||
#722# "Aplica"
|
||||
#723# "Tanca"
|
||||
|
||||
/*********************************************************************************
|
||||
* ROM Information *
|
||||
*********************************************************************************/
|
||||
//ROM Info Title
|
||||
#800# "Informació de ROM"
|
||||
|
||||
//ROM Info Text
|
||||
#801# "Nom de ROM:"
|
||||
#802# "Nom de fitxer:"
|
||||
#803# "Ubicació:"
|
||||
#804# "Mida de ROM:"
|
||||
#805# "ID de cartutx:"
|
||||
#806# "Fabricant:"
|
||||
#807# "País:"
|
||||
#808# "CRC1:"
|
||||
#809# "CRC2:"
|
||||
#810# "Xip CIC:"
|
||||
#811# "MD5:"
|
||||
|
||||
/*********************************************************************************
|
||||
* Cheats *
|
||||
*********************************************************************************/
|
||||
//Cheat List
|
||||
#1000# "Trucs"
|
||||
#1001# "Trucs:"
|
||||
#1002# " Notes: "
|
||||
#1003# "Marca-ho tot"
|
||||
#1004# "Desmarca-ho tot"
|
||||
|
||||
//Add Cheat
|
||||
#1005# "Afegeix truc"
|
||||
#1006# "Nom:"
|
||||
#1007# "Codi:"
|
||||
#1008# "Insereix"
|
||||
#1009# "Neteja"
|
||||
#1010# " Notes del truc: "
|
||||
#1011# "Afegeix a la DB"
|
||||
|
||||
//Code extension
|
||||
#1012# "Extensions de codi"
|
||||
#1013# "Trieu un valor per:"
|
||||
#1014# "D'acord"
|
||||
#1015# "Cancel·la"
|
||||
|
||||
//Digital Value
|
||||
#1016# "Dígit de quantitat"
|
||||
#1017# "Trieu un valor per:"
|
||||
#1018# "&Valor"
|
||||
#1019# "de"
|
||||
#1020# "a"
|
||||
#1021# "&Notes:"
|
||||
#1022# "Afegeix truc"
|
||||
#1023# "Nou truc"
|
||||
#1024# "<adreça> <valor>"
|
||||
#1025# "Opcions:"
|
||||
#1026# "<valor> <etiqueta>"
|
||||
|
||||
//Edit Cheat
|
||||
#1027# "Edita el truc"
|
||||
#1028# "Actualitza el truc"
|
||||
#1029# "El truc s'ha modificat.\n\nVoleu actualitzar?"
|
||||
#1030# "Truc actualitzat"
|
||||
|
||||
//Cheat Popup Menu
|
||||
#1040# "Afegeix nou truc..."
|
||||
#1041# "Edita"
|
||||
#1042# "Esborra"
|
||||
|
||||
// short-cut editor
|
||||
#1100# "Reinicia dreceres"
|
||||
#1101# "Segur que voleu reiniciar les dreceres?\n\nAquesta acció no es podrà desfer."
|
||||
#1102# "Menú de Fitxer"
|
||||
#1103# "Menú de Sistema"
|
||||
#1104# "Opcions"
|
||||
#1105# "Ranures de desat"
|
||||
|
||||
/*********************************************************************************
|
||||
* Messages *
|
||||
*********************************************************************************/
|
||||
#2000# "*** CPU EN PAUSA ***"
|
||||
#2001# "CPU continuat"
|
||||
#2002# "Es troba en un bucle permanent i no pot sortir.\nL'emulació s'aturarà ara.\n\nComproveu la ROM i els paràmetres de ROM."
|
||||
#2003# "No s'ha pogut assignar memòria"
|
||||
#2004# "Ha desaparegut o no és vàlid el complement de vídeo seleccionat o per defecte.\n\nComproveu que teniu com a mínim un fitxer de complement compatible en la carpeta de complements."
|
||||
#2005# "Ha desaparegut o no és vàlid el complement d'àudio seleccionat o per defecte.\n\nComproveu que teniu com a mínim un fitxer de complement compatible en la carpeta de complements."
|
||||
#2006# "Ha desaparegut o no és vàlid el complement d'RSP seleccionat o per defecte.\n\nComproveu que teniu Project64 instal·lat adequadament amb un camí de complements vàlid."
|
||||
#2007# "Ha desaparegut o no és vàlid el complement d'entrada seleccionat o per defecte.\n\nComproveu que teniu com a mínim un fitxer de complement compatible en la carpeta de complements."
|
||||
#2008# "No s'ha pogut carregar el complement:"
|
||||
#2009# "No s'ha pogut carregar la paraula\n\nComproveu la ROM i els paràmetres de ROM."
|
||||
#2010# "No s'ha pogut obrir el fitxer de desat"
|
||||
#2011# "No s'ha pogut obrir l'EEPROM"
|
||||
#2012# "No s'ha pogut obrir el FlashRAM"
|
||||
#2013# "No s'ha pogut obrir el mempak"
|
||||
#2014# "Ha fallat l'intent d'obrir el fitxer zip.\nFitxer zip desaparegut o malmès - comproveu el camí i el fitxer.\n\nPotser necessitareu reiniciar l'aplicació."
|
||||
#2015# "Ha fallat l'intent d'obrir el fitxer."
|
||||
#2016# "S'ha produït un error en provar d'obrir el fitxer zip."
|
||||
#2017# "El fitxer carregat no sembla que sigui una ROM de Nintendo 64 vàlida.\n\nVerifiqueu les ROMs amb GoodN64."
|
||||
#2018# "País desconegut"
|
||||
#2019# "Xip CIC desconegut"
|
||||
#2020# "Format de fitxer desconegut"
|
||||
#2021# "Acció de memòria desconeguda\n\nEmulació aturada"
|
||||
#2022# "OpCode R4300i no gestionat a"
|
||||
#2023# "Executant des d'un espai no-mapat.\n\nVerifiqueu la ROM i els paràmetres de la ROM."
|
||||
#2024# "Sembla que l'estat desat no correspon a la ROM en execució.\n\nEls estats desats s'han de desar i carregar entre ROMs 100% idèntiques,\nen particular la REGIÓ i la VERSIÓ han de ser les mateixes.\nCarregant aquest estat és com provocar una fallida al joc o a l'emulador.\n\nSegur que voleu continuar carregant?"
|
||||
#2025# "Error"
|
||||
#2026# "No s'ha trobat la seqüència de copyright en el LUT. El joc deixarà de funcionar."
|
||||
#2027# "Fallida de protecció de còpia"
|
||||
#2028# "Canviar un complement cal que Project64 reinicii una ROM en execució.\nSi no vols perdre la teva posició, respon No i fes un desat d'estat primer.\n\nVoleu canviar els complements i reiniciar el joc ara?"
|
||||
#2029# "Canvia complements"
|
||||
#2030# "Emulació finalitzada"
|
||||
#2031# "Emulació iniciada"
|
||||
#2032# "No s'ha pogut carregar l'estat desat"
|
||||
#2033# "S'ha carregat l'estat desat"
|
||||
#2034# "S'ha desat l'estat actual a"
|
||||
#2035# "Ranura d'estat desat"
|
||||
#2036# "Imatge d'intercanvi d'octets"
|
||||
#2037# "Triant imatge de N64"
|
||||
#2038# "Carregat"
|
||||
#2039# "Carregant imatge"
|
||||
#2040# "No es pot obrir cap ROM perquè els complements no s'han iniciat correctament"
|
||||
#2041# "Esteu realment segur que voleu esborrar això?"
|
||||
#2042# "Esborra el truc"
|
||||
#2043# "El nom del truc ja es troba en ús"
|
||||
#2044# "Heu arribat al límit màxim de trucs per aquesta ROM"
|
||||
#2045# "Inicialitzant complement"
|
||||
#2046# "No heu seleccionat una clau virtual per assignar a l'element de menú."
|
||||
#2047# "Necessiteu seleccionar un element de menú per assignar a aquesta acció."
|
||||
#2048# "La drecera ja està assignada a un altre element de menú."
|
||||
#2049# "No s'ha seleccionat cap drecera per esborrar."
|
||||
#2050# "ROM carregada. Esperant per iniciar l'emulació."
|
||||
#2051# "La versió beta de Project64 només és pels membres.\n\nSi teniu un compte a pj64.net, no hauríeu de veure aquest error!!\nContacteu amb nosaltres a la web."
|
||||
#2052# "Error del programa"
|
||||
#2053# "No s'ha pogut trobar el fitxer dins del fitxer 7z"
|
||||
#2054# "Emulació de baix nivell (LLE) de vídeo"
|
||||
#2055# "L'LLE de vídeo no és per un ús genèric!!!\nÉs aconsellable que només utilitzis això per fer proves i no per jugar.\n\nVoleu canviar a l'LLE de vídeo?"
|
||||
#2056# "Emulació d'alt nivell (HLE) d'àudio"
|
||||
#2057# "L'HLE d'àudio requereix un complement de tercers!!!\nSi s'utilitza cap complement de tercers que suporti HLE, no hi haurà cap so.\n\nVoleu canviar a l'HLE d'àudio?"
|
|
@ -5,7 +5,7 @@
|
|||
#1 # "简体中文" // LANGUAGE ID
|
||||
#2 # "山姆" // Author
|
||||
#3 # "2.2" // Version
|
||||
#4 # "2015 年 3 月 11 日" // Date
|
||||
#4 # "2015 年 4 月" // Date
|
||||
|
||||
//About DLL Dialog
|
||||
#5 # "当前使用的语言"
|
||||
|
@ -60,7 +60,7 @@
|
|||
#144# "设置音频插件..."
|
||||
#145# "设置控制器插件..."
|
||||
#146# "设置 RSP 插件..."
|
||||
#147# "显示 CPU 占用率 %"
|
||||
#147# "显示 CPU 占用率"
|
||||
#148# "设置(&S)..."
|
||||
|
||||
//Debugger Menu
|
||||
|
@ -183,7 +183,7 @@
|
|||
* Options *
|
||||
*********************************************************************************/
|
||||
//Options Title
|
||||
#400# "系统设置"
|
||||
#400# "设置"
|
||||
|
||||
//Tabs
|
||||
#401# "插件"
|
||||
|
@ -204,8 +204,8 @@
|
|||
#422# " 视频 (图形) 插件: "
|
||||
#423# " 音频 (声音) 插件: "
|
||||
#424# " 输入 (控制器) 插件: "
|
||||
#425# "是否使用高级(HLE)图形?"
|
||||
#426# "是否使用高级(HLE)音频?"
|
||||
#425# "图形HLE模拟"
|
||||
#426# "音频HLE模拟"
|
||||
#427# "** 使用系统插件 **"
|
||||
|
||||
//Directory Dialog
|
||||
|
@ -224,19 +224,19 @@
|
|||
#452# " 选择材质包目录"
|
||||
|
||||
//Options Dialog
|
||||
#460# "当窗口挂起时暂停模拟器"
|
||||
#461# "载入 ROM 完毕后切换为全屏模式"
|
||||
#460# "当窗口处于非活动状态时暂停模拟器"
|
||||
#461# "载入ROM后切换为全屏模式"
|
||||
#462# "隐藏高级设置"
|
||||
#463# "记住已选择的金手指"
|
||||
#464# "在ROM运行时禁用屏幕保护程序"
|
||||
#464# "在ROM运行时关闭屏幕保护"
|
||||
#465# "显示帧速率"
|
||||
#466# "帧速率回显:"
|
||||
#467# "检查Project64是否已经在运行"
|
||||
|
||||
//ROM Browser Tab
|
||||
#480# "最大 # ROM 记录数 (最大 10):"
|
||||
#480# "最大 # ROM 记录数 (0-10):"
|
||||
#481# "ROM"
|
||||
#482# "最大 # ROM 目录记录数 (最大 10):"
|
||||
#482# "最大 # ROM 目录记录数 (0-10):"
|
||||
#483# "目录"
|
||||
#484# "使用 ROM 浏览器"
|
||||
#485# "包含所有子目录"
|
||||
|
@ -249,13 +249,13 @@
|
|||
#492# "自动刷新浏览器"
|
||||
|
||||
//Advanced Options
|
||||
#500# "在这里的大多数被更改的选项要重新载入一个 ROM 或将当前的 ROM 重置才能生效"
|
||||
#500# "大部分所修改的选项无法立即生效,需要打开一个新ROM或重置当前ROM才能生效"
|
||||
#501# "默认内核"
|
||||
#502# "CPU 内核类型:"
|
||||
#503# "自我修改码方案:"
|
||||
#504# "默认存档容量:"
|
||||
#505# "高级模块连接:"
|
||||
#506# "当 ROM 加载后开始模拟"
|
||||
#505# "高级模块连接"
|
||||
#506# "当ROM加载后,开始模拟"
|
||||
#507# "总是从 RDB 中覆盖默认设置"
|
||||
#508# "自动压缩即时存档文件"
|
||||
#509# "开启调试器"
|
||||
|
@ -332,7 +332,7 @@
|
|||
// Accelerator Selector
|
||||
#680# "CPU 状态:"
|
||||
#681# "菜单选项:"
|
||||
#682# "目前使用的按键:"
|
||||
#682# "快捷键:"
|
||||
#683# "选择新快捷键:"
|
||||
#684# "目前设置为:"
|
||||
#685# "设置"
|
||||
|
@ -342,6 +342,7 @@
|
|||
#689# "游戏正在运行"
|
||||
#690# "游戏正在运行 (窗口)"
|
||||
#691# "游戏正在运行 (全屏)"
|
||||
#692# "按下按键"
|
||||
|
||||
// Frame Rate Option
|
||||
#700# "每秒垂直中断 (VI/s)"
|
||||
|
@ -356,6 +357,7 @@
|
|||
#720# "重置此页"
|
||||
#721# "全部重设"
|
||||
#722# "应用"
|
||||
#723# "关闭"
|
||||
|
||||
/*********************************************************************************
|
||||
* ROM Information *
|
||||
|
@ -484,11 +486,11 @@
|
|||
#2023# "没有运行所需的映射空间。
|
||||
|
||||
请检查 ROM 和 ROM 设置."
|
||||
#2024# "即时记忆看来不是当前正在运行的 ROM 的。
|
||||
#2024# "即时存档看来不是当前正在运行的 ROM 的。
|
||||
|
||||
即时记忆必须在 100% 相同的 ROM 上保存和载入,
|
||||
即时存档必须在 100% 相同的 ROM 上保存和载入,
|
||||
特别是版本和区域必须相同。
|
||||
载入这个即时记忆可能使模拟器或游戏死机
|
||||
载入这个即时存档可能使模拟器或游戏死机
|
||||
|
||||
您确实要继续载入吗?"
|
||||
#2025# "错误"
|
||||
|
@ -518,7 +520,7 @@
|
|||
#2046# "您还未设置个虚拟键作为选项"
|
||||
#2047# "您必须选择一个选项分配给菜单选项"
|
||||
#2048# "快捷键已被分配为另一个选项"
|
||||
#2049# "在移除前,还未选择快捷键"
|
||||
#2049# "你还未选择你想要删除的快捷键"
|
||||
#2050# "ROM 已被载入。正在等待模拟开始。"
|
||||
#2051# "Project64 beta仅限于会员.
|
||||
|
||||
|
@ -527,12 +529,13 @@
|
|||
请联系我们网站"
|
||||
#2052# "程序错误"
|
||||
#2053# "无法在7z文件中查询文件名"
|
||||
#2054# "使用低级画面"
|
||||
#2055# "低级(LLE)图形不是平时使用的!!!
|
||||
建议您仅在测试环境下使用低级(LLE)图形, 玩游戏时不要使用低级(LLE)图形
|
||||
#2054# "图形LLE模拟"
|
||||
#2055# "图形LLE模拟不是平时使用的!!!
|
||||
这仅用于测试,而不是玩游戏
|
||||
|
||||
您确定修改为低级(LLE)图形?"
|
||||
#2056# "使用高级音频"
|
||||
#2057# "高级(HLE)音频需要第三方插件!!!
|
||||
如果您使用的第三方插件不支持高级(HLE)音频,您将听不到声音。
|
||||
是否使用高级(HLE)音频?"
|
||||
你确定改成图形LLE?"
|
||||
#2056# "音频HLE模拟"
|
||||
#2057# "音频HLE模拟需要第三方插件!!!
|
||||
如果你使用的第三方插件不支持音频HLE,你将听不到声音。
|
||||
|
||||
你确定改成音频HLE?"
|
||||
|
|
|
@ -131,7 +131,7 @@
|
|||
#268# "Make window stay on top of all other windows"
|
||||
#269# "Change settings inside the graphics plugin"
|
||||
#270# "Change settings inside the audio plugin"
|
||||
#271# "Change settings inside the controller plugin (i.e. set keys)"
|
||||
#271# "Change settings inside the controller plugin (i.e., set keys)"
|
||||
#272# "Change settings inside the RSP plugin"
|
||||
#273# "Show the CPU usage of the emulator split over different resources"
|
||||
#274# "View/change settings for this application"
|
||||
|
@ -177,7 +177,7 @@
|
|||
#320# "Select current ROM directory"
|
||||
|
||||
//Messages
|
||||
#340# "Bad ROM? Use GoodN64 & check for updated RDB"
|
||||
#340# "Bad ROM? Use GoodN64 & check for updated RDB."
|
||||
|
||||
/*********************************************************************************
|
||||
* Options *
|
||||
|
@ -254,7 +254,7 @@
|
|||
#502# "CPU core style:"
|
||||
#503# "Self mod methods"
|
||||
#504# "Default memory size:"
|
||||
#505# "Advanced block linking:"
|
||||
#505# "Advanced block linking"
|
||||
#506# "Start emulation when ROM is opened"
|
||||
#507# "Always override default settings with ones from RDB"
|
||||
#508# "Automatically compress saved states"
|
||||
|
@ -269,7 +269,7 @@
|
|||
#520# "CPU core style:"
|
||||
#521# "VI refresh rate:"
|
||||
#522# "Memory size:"
|
||||
#523# "Advanced block linking:"
|
||||
#523# "Advanced block linking"
|
||||
#524# "Default save type:"
|
||||
#525# "Counter factor:"
|
||||
#526# "Larger compile buffer"
|
||||
|
@ -342,6 +342,7 @@
|
|||
#689# "Game playing"
|
||||
#690# "Game playing (windowed)"
|
||||
#691# "Game playing (full-screen)"
|
||||
#692# "Detect Key"
|
||||
|
||||
// Frame Rate Option
|
||||
#700# "Vertical interrupts per second"
|
||||
|
@ -356,6 +357,7 @@
|
|||
#720# "Reset Page"
|
||||
#721# "Reset All"
|
||||
#722# "Apply"
|
||||
#723# "Close"
|
||||
|
||||
/*********************************************************************************
|
||||
* ROM Information *
|
||||
|
@ -438,33 +440,33 @@
|
|||
*********************************************************************************/
|
||||
#2000# "*** CPU PAUSED ***"
|
||||
#2001# "CPU Resumed"
|
||||
#2002# "In a permanent loop that cannot be exited. \nEmulation will now stop. \n\nVerify ROM and ROM settings."
|
||||
#2002# "In a permanent loop that cannot be exited.\nEmulation will now stop.\n\nVerify ROM and its settings."
|
||||
#2003# "Failed to allocate memory"
|
||||
#2004# "The default or selected video plugin is missing or invalid. \n\nYou need to go into Settings and select a video (graphics) plugin.\nCheck that you have at least one compatible plugin file in your plugin folder."
|
||||
#2005# "The default or selected audio plugin is missing or invalid. \n\nYou need to go into Settings and select a audio (sound) plugin.\nCheck that you have at least one compatible plugin file in your plugin folder."
|
||||
#2006# "The default or selected RSP plugin is missing or invalid. \n\nYou need to go into Settings and select a RSP (Reality Signal Processor) plugin.\nCheck that you have at least one compatible plugin file in your plugin folder."
|
||||
#2007# "The default or selected input plugin is missing or invalid. \n\nYou need to go into Settings and select an input (controller) plugin.\nCheck that you have at least one compatible plugin file in your plugin folder."
|
||||
#2004# "The default or selected video plugin is missing or invalid.\n\nYou need to go into Settings and select a video (graphics) plugin.\nCheck that you have at least one compatible plugin file in your plugin folder."
|
||||
#2005# "The default or selected audio plugin is missing or invalid.\n\nYou need to go into Settings and select a audio (sound) plugin.\nCheck that you have at least one compatible plugin file in your plugin folder."
|
||||
#2006# "The default or selected RSP plugin is missing or invalid.\n\nYou need to go into Settings and select a RSP (Reality Signal Processor) plugin.\nCheck that you have at least one compatible plugin file in your plugin folder."
|
||||
#2007# "The default or selected input plugin is missing or invalid.\n\nYou need to go into Settings and select an input (controller) plugin.\nCheck that you have at least one compatible plugin file in your plugin folder."
|
||||
#2008# "Failed to load plugin:"
|
||||
#2009# "Failed to load word.\n\nVerify ROM and ROM settings."
|
||||
#2009# "Failed to load word.\n\nVerify ROM and its settings."
|
||||
#2010# "Failed to open save file"
|
||||
#2011# "Failed to open EEPROM"
|
||||
#2012# "Failed to open flash RAM"
|
||||
#2013# "Failed to open mempak"
|
||||
#2014# "Attempt to open zip file failed. \n\nProbably a corrupt zip file - try unzipping ROM manually."
|
||||
#2014# "Attempt to open zip file failed.\n\nProbably a corrupt zip file - try unzipping ROM manually."
|
||||
#2015# "Attempt to open file failed."
|
||||
#2016# "Error occurred when trying to open zip file."
|
||||
#2017# "File loaded does not appear to be a valid N64 ROM. \n\nVerify your ROMs with GoodN64."
|
||||
#2017# "File loaded does not appear to be a valid N64 ROM.\n\nVerify your ROMs with GoodN64."
|
||||
#2018# "Unknown country"
|
||||
#2019# "Unknown CIC chip"
|
||||
#2020# "Unknown file format"
|
||||
#2021# "Unknown memory action\n\nEmulation stopped"
|
||||
#2022# "Unhandled R4300i opcode at"
|
||||
#2023# "Executing from non-mapped space.\n\nVerify ROM and ROM settings."
|
||||
#2024# "This saved state does not appear to match the running ROM. \n\nStates must be saved & loaded between 100% identical ROMs. \nIn particular the REGION and VERSION need to be the same. \nLoading this state is likely to cause the game and/or emulator to crash. \n\nAre you sure you want to continue loading?"
|
||||
#2023# "Executing from non-mapped space.\n\nVerify ROM and its settings."
|
||||
#2024# "This saved state does not appear to match the running ROM.\n\nStates must be saved & loaded between 100% identical ROMs.\nIn particular, the REGION and VERSION need to be the same.\nLoading this state is likely to cause the game and/or emulator to crash.\n\nAre you sure you want to continue loading?"
|
||||
#2025# "Error"
|
||||
#2026# "Copyright sequence not found in LUT. Game will no longer function."
|
||||
#2027# "Copy Protection Failure"
|
||||
#2028# "Changing a plugin requires Project64 to reset a running ROM. \nIf you don't want to lose your place, answer No and save the current state first. \n\nChange plugins and reset ROM now?"
|
||||
#2028# "Changing a plugin requires Project64 to reset a running ROM.\nIf you don't want to lose your place, answer No and save the current state first.\n\nChange plugins and reset ROM now?"
|
||||
#2029# "Change Plugins"
|
||||
#2030# "Emulation ended"
|
||||
#2031# "Emulation started"
|
||||
|
@ -487,7 +489,7 @@
|
|||
#2048# "Short-cut has already been assigned to another menu item."
|
||||
#2049# "No shortcut has been selected to be removed."
|
||||
#2050# "ROM loaded. Waiting for emulation to start."
|
||||
#2051# "Project64 beta is for members only.\n\nIf you have an account at pj64.net, you should not be seeing this error!!\nPlease contact us on the site."
|
||||
#2051# "Project64 beta versions are for members only.\n\nIf you have an account at www.pj64-emu.com, you should not be seeing this error!!\nPlease contact us on the site."
|
||||
#2052# "Program Error"
|
||||
#2053# "Failed to find filename in 7z file"
|
||||
#2054# "Graphics Low-Level Emulation"
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
#271# "Configure selected input (controller) plugin"
|
||||
#272# "Configure RSP plugin"
|
||||
#273# "Show/hide display of system CPU use divided amoung emulator components"
|
||||
#274# "Project64 main application settings (plugin selection etc.)"
|
||||
#274# "Project64 main application settings (plugin selection, etc.)"
|
||||
#275# "Open the User Manual for Project64"
|
||||
#276# "Open the Project64 game-specific FAQ"
|
||||
#278# "About the application and authors"
|
||||
|
|
|
@ -1,134 +1,152 @@
|
|||
/*********************************************************************************
|
||||
/*********************************************************************************
|
||||
* Meta Information *
|
||||
*********************************************************************************/
|
||||
//About DLL
|
||||
#1 # "Français" // LANGUAGE ID
|
||||
#2 # "Pharmboy (Pharmboy_VII@hotmail.com)" // Author
|
||||
#3 # "1.5.3" // Version
|
||||
#4 # "2002-09-11" // Date
|
||||
#2 # "Benjamin Siskoo" // Author
|
||||
#3 # "2.2" // Version
|
||||
#4 # "6 Mai 2015" // Date
|
||||
|
||||
//About DLL Dialog
|
||||
#5 # "Langue actuelle (.pj.Lang)"
|
||||
#5 # "Langue actuelle"
|
||||
#6 # "Auteur"
|
||||
#7 # "Version"
|
||||
#8 # "Date"
|
||||
#9 # "Site de l'auteur"
|
||||
#10 # "Base de données des ROMs (Project64.rdb)"
|
||||
#11 # "Fichier des codes triche (Project64.cht)"
|
||||
#12 # "Informations étendues des ROMs (Project64.rdx)"
|
||||
#9 # "Visiter le site web"
|
||||
#10 # "Base de données des ROM (.rdb)"
|
||||
#11 # "Fichier des cheats (.cht)"
|
||||
#12 # "Infos sur les ROM étendues (.rdx)"
|
||||
|
||||
//About INI title
|
||||
#20 # "Project64 utilise actuellement :"
|
||||
#20 # "À propos des fichiers de configuration"
|
||||
|
||||
/*********************************************************************************
|
||||
* Menu *
|
||||
*********************************************************************************/
|
||||
//File Menu
|
||||
#100# "&Fichier"
|
||||
#101# "&Ouvrir une ROM..."
|
||||
#102# "&Infos sur la ROM..."
|
||||
#103# "&Démarrer l'émulation"
|
||||
#104# "&Arrêter l'émulation"
|
||||
#105# "&Choix du dossier des ROMs..."
|
||||
#106# "&Rafraîchir la liste des ROMs"
|
||||
#107# "Ro&ms récentes"
|
||||
#108# "Do&ssier des ROMs récentes"
|
||||
#101# "&Ouvrir une ROM"
|
||||
#102# "&Infos sur la ROM…"
|
||||
#103# "Démarrer l’émulation"
|
||||
#104# "Arrêter l’émulation"
|
||||
#105# "Choisir le répertoire des ROM…"
|
||||
#106# "Rafraîchir la liste des ROM"
|
||||
#107# "ROM récentes"
|
||||
#108# "Répertoires des ROM récentes"
|
||||
#109# "&Quitter"
|
||||
|
||||
//System Menu
|
||||
#120# "S&ystème"
|
||||
#121# "&Redémarrer la ROM"
|
||||
#120# "&Système"
|
||||
#121# "&Redémarrer"
|
||||
#122# "&Pause"
|
||||
#123# "Cap&ture d'écran"
|
||||
#124# "&Vitesse réelle"
|
||||
#125# "&Sauvegarde rapide"
|
||||
#126# "S&auvegarder sous..."
|
||||
#127# "&Chargement rapide"
|
||||
#128# "C&harger..."
|
||||
#129# "&Numéro de la sauvegarde rapide"
|
||||
#130# "C&odes triche..."
|
||||
#131# "&Bouton triche"
|
||||
#132# "Cont&inuer"
|
||||
#123# "&Capture d’écran"
|
||||
#124# "Limiter les FPS"
|
||||
#125# "&Sauvegarder l’état"
|
||||
#126# "Sauvegarder sous…"
|
||||
#127# "&Charger un état"
|
||||
#128# "Charger…"
|
||||
#129# "Sauvegarder l’&état actuel"
|
||||
#130# "Cheats…"
|
||||
#131# "Bouton GameShark (cheats)"
|
||||
#132# "R&eprendre"
|
||||
#133# "Redémarrage &logiciel"
|
||||
#134# "Redémarrage &matériel"
|
||||
|
||||
//Options Menu
|
||||
#140# "&Options"
|
||||
#141# "&Plein écran"
|
||||
#142# "&Toujours au premier plan"
|
||||
#143# "Configurer le plugin &Vidéo..."
|
||||
#144# "Configurer le plugin &Audio..."
|
||||
#145# "Configurer le plugin &Contrôles..."
|
||||
#146# "Configurer le plugin &RSP..."
|
||||
#147# "A&fficher la charge du CPU en %"
|
||||
#148# "Ré&glages..."
|
||||
#142# "&Toujours visible"
|
||||
#143# "Configurer le plugin graphique…"
|
||||
#144# "Configurer le plugin audio…"
|
||||
#145# "Configurer le plugin contrôleur…"
|
||||
#146# "Configurer le plugin RSP…"
|
||||
#147# "Afficher l’utilisation du CPU"
|
||||
#148# "&Paramètres…"
|
||||
|
||||
//Debugger Menu
|
||||
#160# "&Débogueur"
|
||||
|
||||
//Language Menu
|
||||
#175# "&Langue"
|
||||
#175# "&Langage"
|
||||
|
||||
//Help Menu
|
||||
#180# "&Aide"
|
||||
#181# "A propos des fichiers &INI"
|
||||
#182# "A propos de &Project64"
|
||||
#181# "À propos des fichiers de conf&iguration"
|
||||
#182# "À &propos de Project64"
|
||||
#183# "&Forum de support"
|
||||
#184# "Site &web"
|
||||
|
||||
//Current Save Slot menu
|
||||
#190# "&Par défaut (.pj)"
|
||||
#191# "&1 (.pj1)"
|
||||
#192# "&2 (.pj2)"
|
||||
#193# "&3 (.pj3)"
|
||||
#194# "&4 (.pj4)"
|
||||
#195# "&5 (.pj5)"
|
||||
#196# "&6 (.pj6)"
|
||||
#197# "&7 (.pj7)"
|
||||
#198# "&8 (.pj8)"
|
||||
#199# "&9 (.pj9)"
|
||||
#200# "1&0 (.pj0)"
|
||||
#190# "Défaut"
|
||||
#191# "Emplacement 1"
|
||||
#192# "Emplacement 2"
|
||||
#193# "Emplacement 3"
|
||||
#194# "Emplacement 4"
|
||||
#195# "Emplacement 5"
|
||||
#196# "Emplacement 6"
|
||||
#197# "Emplacement 7"
|
||||
#198# "Emplacement 8"
|
||||
#199# "Emplacement 9"
|
||||
#200# "Emplacement 10"
|
||||
|
||||
//Pop up Menu
|
||||
#210# "&Jouer"
|
||||
#211# "&Informations sur la ROM"
|
||||
#212# "&Editer les réglages du jeu"
|
||||
#213# "Editer les codes &triche"
|
||||
#210# "Lancer le jeu"
|
||||
#211# "Informations sur la ROM"
|
||||
#212# "Éditer les paramètres du jeu"
|
||||
#213# "Éditer les cheats"
|
||||
#214# "Plugin graphique"
|
||||
|
||||
//Alternate Name to save Slot
|
||||
#220# "Emplacement de sauvegarde - Défaut"
|
||||
#221# "Emplacement de sauvegarde - 1"
|
||||
#222# "Emplacement de sauvegarde - 2"
|
||||
#223# "Emplacement de sauvegarde - 3"
|
||||
#224# "Emplacement de sauvegarde - 4"
|
||||
#225# "Emplacement de sauvegarde - 5"
|
||||
#226# "Emplacement de sauvegarde - 6"
|
||||
#227# "Emplacement de sauvegarde - 7"
|
||||
#228# "Emplacement de sauvegarde - 8"
|
||||
#229# "Emplacement de sauvegarde - 9"
|
||||
#230# "Emplacement de sauvegarde - 10"
|
||||
|
||||
// Menu Descriptions
|
||||
#250# "Parcourir l'ordinateur pour trouver et charger une ROM"
|
||||
#251# "Afficher des informations sur la ROM chargée"
|
||||
#252# "Démarrer l'émulation de la ROM chargée"
|
||||
#253# "Arrêter l'émulation de la ROM chargée et retourner au navigateur"
|
||||
#254# "Changer le dossier du navigateur de ROMs"
|
||||
#255# "Rafraîchir la fenêtre du navigateur pour refléter les changements du dossier des ROMs"
|
||||
#256# "Quitter Project64"
|
||||
#257# "Redémarrer l'émulation de la ROM"
|
||||
#258# "Mettre en pause/redémarrer l'émulation de la ROM"
|
||||
#259# "Générer un fichier bitmap à partir du plugin graphique"
|
||||
#260# "Limiter le nombre de 'VI/s' à la vitesse réelle selon la région de la ROM"
|
||||
#261# "Sauvegarder l'état actuel du système avec le numéro choisi"
|
||||
#262# "Sauvegarder l'état du système avec choix du dossier où sauvegarder"
|
||||
#263# "Charger l'état du système contenu dans une sauvegarde rapide"
|
||||
#264# "Choisir une sauvegarde de l'état à charger"
|
||||
#265# "Choisir ou ajouter des codes triche pour la ROM chargée"
|
||||
#266# "Emuler l'appui sur le bouton du 'GameShark' - à utiliser avec certains codes triche"
|
||||
#267# "Basculer du mode fenêtre au mode plein écran (appuyer sur Esc pour revenir au mode fenêtre)"
|
||||
#268# "Garder la fenêtre de Project64 devant les autres fenêtres"
|
||||
#269# "Configurer le plugin vidéo actuel"
|
||||
#270# "Configurer le plugin audio actuel"
|
||||
#271# "Configurer le plugin des contrôles actuel"
|
||||
#272# "Configurer le plugin 'Reality Signal Processor'"
|
||||
#273# "Montrer/masquer l'affichage de la charge actuelle du CPU selon les composants"
|
||||
#274# "Réglages principaux de Project64 (sélection des plugins, etc...)"
|
||||
#275# "Ouvrir le manuel de l'utilisateur pour Project64"
|
||||
#276# "Ouvrir la Foire Aux Questions sur les jeux"
|
||||
#277# "A propos des auteurs des fichiers de support"
|
||||
#278# "A propos du programme et de ces auteurs"
|
||||
#279# "Charger une ROM chargée récemment"
|
||||
#280# "Basculer le navigateur de ROMs vers le dossier choisi"
|
||||
#281# "Changer la langue de l'interface graphique de Project64"
|
||||
#282# "Changer le numéro de la sauvegarde rapide"
|
||||
#283# "Charger et démarrer l'émulation du jeu choisi"
|
||||
#284# "Voir les informations sur le jeu choisi"
|
||||
#285# "Editer les réglages du jeu choisi dans le fichier RDB"
|
||||
#286# "Editer les codes triche du jeu choisi dans le fichier CHT"
|
||||
#250# "Ouvrir une image ROM N64"
|
||||
#251# "Afficher les informations concernant l’image chargée"
|
||||
#252# "Lancer l’émulation de l’image ROM chargée"
|
||||
#253# "Arrêter l’émulation de l’image ROM chargée"
|
||||
#254# "Sélectionner le répertoire des ROM"
|
||||
#255# "Rafraîchir la liste actuelle des ROM dans le navigateur de ROM"
|
||||
#256# "Quitter l’application"
|
||||
#257# "Redémarrer l’image ROM actuelle (recharger tous les changements de paramètres)"
|
||||
#258# "Mettre en pause/reprendre l’émulation de la ROM lancée"
|
||||
#259# "Générer une image bitmap de l’écran actuel"
|
||||
#260# "Limiter les FPS à la bonne vitesse de la N64"
|
||||
#261# "Sauvegarder l’état actuel du système"
|
||||
#262# "Sauvegarder l’état actuel du système à l’emplacement du fichier sélectionné"
|
||||
#263# "Charger la sauvegarde d’état"
|
||||
#264# "Choisir un fichier de sauvegarde d’état à charger"
|
||||
#265# "Activer/désactiver les cheats GameShark"
|
||||
#266# "Le bouton GameShark est utilisé avec des cheats spécifiques."
|
||||
#267# "Basculer l’émulation du mode fenêtré vers le mode plein écran."
|
||||
#268# "Permet de mettre la fenêtre Project64 toujours au premier plan"
|
||||
#269# "Configurer le plugin graphique"
|
||||
#270# "Configurer le plugin audio"
|
||||
#271# "Configurer le plugin contrôleur (ex : choisir les touches)"
|
||||
#272# "Configurer le plugin RSP"
|
||||
#273# "Afficher l’utilisation du CPU de l’émulateur répartie sur les différentes ressources"
|
||||
#274# "Voir/changer les paramètres pour cette application"
|
||||
#275# "Voir le manuel pour l’application"
|
||||
#276# "Voir la FAQ pour l’application"
|
||||
#278# "À propos de l’application et des auteurs"
|
||||
#277# "À propos des auteurs sur les fichiers de support"
|
||||
#279# "Ouvrir l’image ROM ouverte précédemment"
|
||||
#280# "Choisir ce répertoire comme votre répertoire de jeu"
|
||||
#281# "Changer l’application pour utiliser cette langue"
|
||||
#282# "Choisir l’emplacement de sauvegarde pour l’état sauvegardé"
|
||||
#283# "Jouer au jeu sélectionné"
|
||||
#284# "Informations concernant le jeu sélectionné"
|
||||
#285# "Éditer les paramètres pour le jeu sélectionné"
|
||||
#286# "Éditer les cheats pour le jeu sélectionné"
|
||||
|
||||
/*********************************************************************************
|
||||
* ROM Browser *
|
||||
|
@ -136,11 +154,11 @@
|
|||
//ROM Browser Fields
|
||||
#300# "Nom du fichier"
|
||||
#301# "Nom interne"
|
||||
#302# "Nom dans GoodN64"
|
||||
#302# "Nom correct (GoodN64)"
|
||||
#303# "Statut"
|
||||
#304# "Taille de la ROM"
|
||||
#305# "Notes (noyau)"
|
||||
#306# "Notes (plugins)"
|
||||
#306# "Notes (plugins par défaut)"
|
||||
#307# "Notes (utilisateur)"
|
||||
#308# "ID de la cartouche"
|
||||
#309# "Constructeur"
|
||||
|
@ -152,271 +170,327 @@
|
|||
#315# "Date de sortie"
|
||||
#316# "Genre"
|
||||
#317# "Joueurs"
|
||||
#318# "Forcer le feedback"
|
||||
#319# "Format de fichier"
|
||||
|
||||
//Select ROM
|
||||
#320# "Choisir le dossier des ROMs pour le navigateur de ROMs"
|
||||
#320# "Sélectionner le répertoire de ROM actuel"
|
||||
|
||||
//Messages
|
||||
#340# "Mauvaise ROM? Utilisez GoodN64, cherchez un nouveau fichier RDB"
|
||||
#340# "Mauvaise ROM ? Utilisez GoodN64 et vérifiez que le fichier RDB est à jour"
|
||||
|
||||
/*********************************************************************************
|
||||
* Options *
|
||||
*********************************************************************************/
|
||||
//Options Title
|
||||
#400# "Réglages de Project64"
|
||||
#400# "Paramètres"
|
||||
|
||||
//Tabs
|
||||
#401# "Plugins"
|
||||
#402# "Dossiers"
|
||||
#402# "Répertoires"
|
||||
#403# "Options"
|
||||
#404# "Sélection d'une ROM"
|
||||
#405# "Avancées"
|
||||
#406# "Réglages de la ROM"
|
||||
#407# "Association"
|
||||
#408# "Notes sur la ROM"
|
||||
#404# "Navigateur de ROM"
|
||||
#405# "Avancé"
|
||||
#406# "Paramètres généraux"
|
||||
#407# "Intégration au shell"
|
||||
#408# "Notes"
|
||||
#409# "Raccourcis clavier"
|
||||
#410# "Statut"
|
||||
#411# "Recompilateur"
|
||||
|
||||
//Plugin Dialog
|
||||
#420# "A propos"
|
||||
#421# "Plugin &Reality Signal Processor"
|
||||
#422# "Plugin &Vidéo"
|
||||
#423# "Plugin &Audio"
|
||||
#424# "Plugin &Contrôles"
|
||||
#420# "À propos"
|
||||
#421# " Plugin RSP (Reality Signal Processor) : "
|
||||
#422# " Plugin vidéo (graphique) : "
|
||||
#423# " Plugin audio (son) : "
|
||||
#424# " Plugin input (contrôleur) : "
|
||||
#425# "Graphismes HLE"
|
||||
#426# "Audio HLE"
|
||||
#427# "** Utiliser le plugin système **"
|
||||
|
||||
//Directory Dialog
|
||||
#440# "Dossier des &plugins"
|
||||
#441# "Dossier des &ROMs"
|
||||
#442# "Dossier des sauvegardes de la &N64"
|
||||
#443# "Dossier des &sauvegardes rapides"
|
||||
#444# "Dossier des &captures d'écran"
|
||||
#445# "Retenir le dernier dossier où une ROM a été ouverte"
|
||||
#446# "Choisir un dossier pour les plugins"
|
||||
#447# "Choisir un dossier pour les ROMs"
|
||||
#448# "Choisir un dossier pour les sauvegardes de la N64"
|
||||
#449# "Choisir un dossier pour les sauvegardes rapides"
|
||||
#450# "Choisir un dossier pour les captures d'écran"
|
||||
#440# " Répertoire des plugins : "
|
||||
#441# " Répertoire des ROM : "
|
||||
#442# " Répertoire des sauvegardes N64 natives : "
|
||||
#443# " Répertoire des sauvegardes d’état : "
|
||||
#444# " Répertoire des captures d’écran : "
|
||||
#445# "Dernier répertoire d’où la ROM a été ouverte"
|
||||
#446# "Sélectionner le répertoire des plugins"
|
||||
#447# "Sélectionner le répertoire des ROM"
|
||||
#448# "Sélectionner le répertoire des sauvegardes N64 natives"
|
||||
#449# "Sélectionner le répertoire des sauvegardes d’état"
|
||||
#450# "Sélectionner le répertoire des captures d’écran"
|
||||
#451# " Répertoire du pack de textures : "
|
||||
#452# "Sélectionner le répertoire du pack de texture"
|
||||
|
||||
//Options Dialog
|
||||
#460# "&Mettre en pause quand la fenêtre perd le focus"
|
||||
#461# "Basculer en &plein écran quand une ROM est chargée"
|
||||
#462# "&Cacher les réglages avancés (recommandé)"
|
||||
#463# "&Retenir les codes triche sélectionnés"
|
||||
//Options (general) Tab
|
||||
#460# "Émulation en pause quand la fenêtre est inactive"
|
||||
#461# "Passer en plein écran au chargement d’une ROM"
|
||||
#462# "Cacher les paramètres avancés"
|
||||
#463# "Retenir les cheats sélectionnés"
|
||||
#464# "Désactiver l’écran de veille quand une ROM est lancée"
|
||||
#465# "Afficher la vitesse"
|
||||
#466# "Vitesse affichée :"
|
||||
#467# "Vérifier si Project64 est déjà lancé"
|
||||
|
||||
//ROM Browser Tab
|
||||
#480# "&Nombres de ROMs à retenir (0-10)"
|
||||
#481# "ROMs"
|
||||
#482# "N&ombre de dossiers de ROMs à retenir (0-10)"
|
||||
#483# "dossiers"
|
||||
#484# "Na&vigateur de ROMs activé"
|
||||
#485# "&Récursivité des dossiers"
|
||||
#486# "&Champs disponibles :"
|
||||
#487# "&Montrer dans cet ordre :"
|
||||
#488# "&Ajouter ->"
|
||||
#489# "<- &Enlever"
|
||||
#490# "&Haut"
|
||||
#491# "&Bas"
|
||||
#480# "Max de ROM à retenir (0-10) :"
|
||||
#481# "ROM"
|
||||
#482# "Max de répertoires ROM à retenir (0-10) :"
|
||||
#483# "répertoires"
|
||||
#484# "Utiliser le navigateur de ROM"
|
||||
#485# "Utiliser également les sous-répertoires"
|
||||
#486# "Champs disponibles :"
|
||||
#487# "Champs dans l’ordre :"
|
||||
#488# "Ajouter ->"
|
||||
#489# "<- Supprimer"
|
||||
#490# "Haut"
|
||||
#491# "Bas"
|
||||
#492# "Rafraîchir automatiquement le navigateur"
|
||||
|
||||
//Advanced Options
|
||||
#500# "Ces réglages sont utilisés si le RDB n'a pas spécifié de valeur,
|
||||
aucun RDB n'existe ou l'option 'Préférer ...' n'est pas cochée"
|
||||
#501# "&Réglages par défaut du noyau"
|
||||
#502# "&Noyau R4300i :"
|
||||
#503# "&Méthode du 'Self-mod. Code' :"
|
||||
#504# "&Taille de la RDRAM :"
|
||||
#505# "&Advanced Block Linking :"
|
||||
#506# "&Démarrer l'émulation après le chargement des ROMs"
|
||||
#507# "&Préférer les réglages du fichier RDB à ceux par défaut"
|
||||
#508# "&Compresser (zip) toutes les sauvegardes rapides"
|
||||
#500# "La plupart de ces changements ne prendront pas effet avant qu’une nouvelle ROM soit ouverte ou que la ROM actuelle soit redémarrée."
|
||||
#501# "Noyau par défaut"
|
||||
#502# "Style de noyau CPU :"
|
||||
#503# "Méthodes Self Mod"
|
||||
#504# "Taille de la mémoire par défaut :"
|
||||
#505# "Liaison de blocs avancée"
|
||||
#506# "Démarrer l’émulation au chargement d’une ROM"
|
||||
#507# "Préférer les réglages du fichier RDB à ceux par défaut"
|
||||
#508# "Compresser automatiquement les sauvegardes d’état"
|
||||
#509# "Activer le débogueur"
|
||||
#510# "Cache"
|
||||
#511# "PI DMA"
|
||||
#512# "Lancer si modifié"
|
||||
#513# "Protéger la mémoire"
|
||||
#514# "TLB unmapping"
|
||||
|
||||
//ROM Options
|
||||
#520# "&Noyau R4300i :"
|
||||
#521# "&Méthode du 'Self-mod. Code' :"
|
||||
#522# "&Taille de la RDRAM :"
|
||||
#523# "&Advanced Block Linking :"
|
||||
#524# "T&ype de sauvegarde :"
|
||||
#525# "&Counter Factor :"
|
||||
#526# "&Larger Compile Buffer"
|
||||
#527# "TL&B"
|
||||
#528# "&Register Caching"
|
||||
#529# "Delay SI &Interrupt"
|
||||
#530# "SP &Hack"
|
||||
#531# "* par défaut"
|
||||
#520# "Style de noyau CPU :"
|
||||
#521# "Taux de rafraîchissement VI :"
|
||||
#522# "Taille de la mémoire :"
|
||||
#523# "Liaison de blocs avancée"
|
||||
#524# "Type de sauvegarde :"
|
||||
#525# "Facteur compteur :"
|
||||
#526# "Plus grand tampon de compilation"
|
||||
#527# "Utiliser le TLB"
|
||||
#528# "Mettre en cache les registres"
|
||||
#529# "Retarder l’interruption SI"
|
||||
#530# "SP rapide"
|
||||
#531# "Défaut"
|
||||
#532# "Signal audio RSP"
|
||||
#533# "Correction du timing audio"
|
||||
#534# "Méthode de recherche de fonctions :"
|
||||
#535# "Méthode self mod personnalisée"
|
||||
#536# "Synchronisation audio"
|
||||
#537# "Compteur AI par octet"
|
||||
#538# "Moteur 32 bits"
|
||||
#539# "Retarder l’interruption DP"
|
||||
|
||||
//Core Styles
|
||||
#540# "Interpréteur"
|
||||
#541# "Recompileur"
|
||||
#541# "Recompilateur"
|
||||
#542# "Synchroniser les noyaux"
|
||||
|
||||
//Self Mod Methods
|
||||
#560# "Aucune"
|
||||
#560# "Aucun"
|
||||
#561# "Cache"
|
||||
#562# "Protect Memory"
|
||||
#563# "Check Memory & Cache"
|
||||
#564# "Change Memory & Cache"
|
||||
#565# "Check Memory Advance"
|
||||
#562# "Protéger la mémoire"
|
||||
#563# "Vérifier la mémoire et le cache"
|
||||
#564# "Changer la mémoire et le cache"
|
||||
#565# "Vérifier la mémoire avancée"
|
||||
#566# "Vider le code du cache"
|
||||
|
||||
//Function Lookup method
|
||||
#570# "Table de recherche physique"
|
||||
#571# "Table de recherche virtuelle"
|
||||
#572# "Changer la mémoire"
|
||||
|
||||
//RDRAM Size
|
||||
#580# "4 Mo"
|
||||
#581# "8 Mo"
|
||||
|
||||
//Advanced Block Linking
|
||||
#600# "Oui"
|
||||
#601# "Non"
|
||||
#600# "On"
|
||||
#601# "Off"
|
||||
|
||||
//Save Type
|
||||
#620# "* détecter automatiquement"
|
||||
#621# "4-kbit EEPROM"
|
||||
#622# "16-kbit EEPROM"
|
||||
#623# "32-ko SRAM"
|
||||
#624# "128-ko flash RAM"
|
||||
#620# "Par défaut"
|
||||
#621# "4 kbit EEPROM"
|
||||
#622# "16 kbit EEPROM"
|
||||
#623# "32 ko SRAM"
|
||||
#624# "Flash RAM"
|
||||
|
||||
//Shell Intergration Tab
|
||||
#640# "Associer à Project64 :"
|
||||
//Shell Integration Tab
|
||||
#640# "Associer l’extension de fichier :"
|
||||
|
||||
//ROM Notes
|
||||
#660# "&Statut :"
|
||||
#661# "Notes (&noyau) :"
|
||||
#662# "Notes (&plugin) :"
|
||||
#660# "Statut ROM :"
|
||||
#661# "Note noyau :"
|
||||
#662# "Note plugin :"
|
||||
|
||||
// Accelerator Selector
|
||||
#680# "État du CPU :"
|
||||
#681# "Menu objet :"
|
||||
#682# "Touches actuelles :"
|
||||
#683# "Sélectionner nouveau raccourci :"
|
||||
#684# "Actuellement assigné à :"
|
||||
#685# "Assigner"
|
||||
#686# "Supprimer"
|
||||
#687# "Tout Réinitialiser"
|
||||
#688# "Aucun jeu lancé"
|
||||
#689# "Un jeu est lancé"
|
||||
#690# "Un jeu est lancé (fenêtré)"
|
||||
#691# "Un jeu est lancé (plein écran)"
|
||||
|
||||
// Frame Rate Option
|
||||
#700# "Interruptions verticales par seconde"
|
||||
#701# "Listes d’affichage par seconde"
|
||||
#702# "Pourcentage de la vitesse normale"
|
||||
|
||||
// Increase speed
|
||||
#710# "Augmenter la vitesse du jeu"
|
||||
#711# "Diminuer la vitesse du jeu"
|
||||
|
||||
//Bottom page buttons
|
||||
#720# "Réinitialiser la page"
|
||||
#721# "Tout réinitialiser"
|
||||
#722# "Appliquer"
|
||||
|
||||
/*********************************************************************************
|
||||
* ROM Information *
|
||||
*********************************************************************************/
|
||||
//ROM Info Title Title
|
||||
#800# "Information sur la ROM"
|
||||
//ROM Info Title
|
||||
#800# "Informations sur la ROM"
|
||||
|
||||
//ROM Info Text
|
||||
#801# "Nom interne"
|
||||
#802# "Nom du fichier"
|
||||
#803# "Lieu"
|
||||
#804# "Taille"
|
||||
#805# "ID de la cartouche"
|
||||
#806# "Constructeur"
|
||||
#807# "Pays"
|
||||
#808# "CRC1"
|
||||
#809# "CRC2"
|
||||
#810# "Puce CIC"
|
||||
#801# "Nom de la ROM :"
|
||||
#802# "Nom du fichier :"
|
||||
#803# "Emplacement :"
|
||||
#804# "Taille de la ROM :"
|
||||
#805# "ID cartouche :"
|
||||
#806# "Développeur :"
|
||||
#807# "Pays :"
|
||||
#808# "CRC1 :"
|
||||
#809# "CRC2 :"
|
||||
#810# "Puce CIC :"
|
||||
#811# "MD5 :"
|
||||
|
||||
/*********************************************************************************
|
||||
* Cheats *
|
||||
*********************************************************************************/
|
||||
//Cheat List
|
||||
#1000# "Codes triche"
|
||||
#1001# "Codes :"
|
||||
#1002# "Notes :"
|
||||
#1000# "Cheats"
|
||||
#1001# "Cheats :"
|
||||
#1002# " Notes : "
|
||||
#1003# "Tout cocher"
|
||||
#1004# "&Tout décocher"
|
||||
#1004# "Tout décocher"
|
||||
|
||||
//Add Cheat
|
||||
#1005# "Ajouter un code"
|
||||
#1005# "Ajouter un cheat"
|
||||
#1006# "Nom :"
|
||||
#1007# "Code :"
|
||||
#1008# "Insérer"
|
||||
#1009# "Effacer"
|
||||
#1010# "Notes (code) : "
|
||||
#1011# "Ajouter au fichier"
|
||||
#1022# "Ajouter un code"
|
||||
#1023# "Nouveau code"
|
||||
#1024# "<adresse> <valeur>"
|
||||
#1025# "Options :"
|
||||
#1026# "<valeur> <objet>"
|
||||
#1009# "Vider"
|
||||
#1010# " Notes cheat : "
|
||||
#1011# "Ajouter à la BDD"
|
||||
|
||||
//Code extension
|
||||
#1012# "Extensions des codes"
|
||||
#1013# "Choisir une valeur à utiliser pour :"
|
||||
#1012# "Extensions de code"
|
||||
#1013# "Veuillez choisir une valeur à utiliser pour :"
|
||||
#1014# "OK"
|
||||
#1015# "Annuler"
|
||||
|
||||
//Digital Value
|
||||
#1016# "Chiffre de quantité"
|
||||
#1017# "Choisir une valeur pour :"
|
||||
#1016# "Nombre quantité"
|
||||
#1017# "Veuillez choisir une valeur pour :"
|
||||
#1018# "&Valeur"
|
||||
#1019# "de"
|
||||
#1020# "jusqu'à"
|
||||
#1019# "depuis"
|
||||
#1020# "vers"
|
||||
#1021# "&Notes :"
|
||||
#1022# "Ajouter un cheat"
|
||||
#1023# "nouveau cheat"
|
||||
#1024# "<adresse> <valeur>"
|
||||
#1025# "Options :"
|
||||
#1026# "<valeur> <label>"
|
||||
|
||||
//Edit Cheat
|
||||
#1027# "Editer le code"
|
||||
#1028# "Mettre à jour"
|
||||
#1027# "Éditer un cheat"
|
||||
#1028# "Mettre à jour un cheat"
|
||||
#1029# "Le cheat a été modifié.\n\nVoulez vous mettre à jour ?"
|
||||
#1030# "Cheat mise à jour"
|
||||
|
||||
//Cheat Popup Menu
|
||||
#1040# "Ajouter un nouveau code..."
|
||||
#1041# "Editer..."
|
||||
#1042# "Supprimer"
|
||||
#1040# "Ajouter un nouveau cheat…"
|
||||
#1041# "Éditer"
|
||||
#1042# "Effacer"
|
||||
|
||||
// short-cut editor
|
||||
#1100# "Réinitialiser les raccourcis"
|
||||
#1101# "Êtes-vous sûr de vouloir réinitialiser les raccourcis?\n\nCette action ne peut pas être annulée."
|
||||
#1102# "Menu fichier"
|
||||
#1103# "Menu système"
|
||||
#1104# "Options"
|
||||
#1105# "Emplacements de sauvegarde"
|
||||
|
||||
/*********************************************************************************
|
||||
* Messages *
|
||||
*********************************************************************************/
|
||||
#2000# "Pause"
|
||||
#2001# "Reprise"
|
||||
#2002# "Dans une boucle permanente qui ne peut pas être quittée.
|
||||
L'émulation va maintenant s'arrêter.
|
||||
|
||||
Verifiez la ROM et ces réglages."
|
||||
#2003# "Echec de l'allocation la mémoire"
|
||||
#2004# "Le plugin vidéo par défaut ou sélectionné est manquant ou est invalide.
|
||||
|
||||
Vérifiez que vous avez au moins un fichier plugin compatible dans le dossier des plugins."
|
||||
#2005# "Le plugin audio par défaut ou sélectionné est manquant ou est invalide.
|
||||
|
||||
Vérifiez que vous avez au moins un fichier plugin compatible dans le dossier des plugins."
|
||||
#2006# "Le plugin RSP par défaut ou sélectionné est manquant ou est invalide.
|
||||
|
||||
Vérifiez que vous avez installé proprement Project64 avec le dossier des plugins bien défini."
|
||||
#2007# "Le plugin contrôles par défaut ou sélectionné est manquant ou est invalide.
|
||||
|
||||
Vérifiez que vous avez au moins un fichier plugin compatible dans le dossier des plugins."
|
||||
#2008# "Echec du chargement du plugin :"
|
||||
#2009# "Echec du chargement du mot
|
||||
|
||||
Vérifiez la ROM et ces réglages."
|
||||
#2010# "Echec de l'ouverture de la sauvegarde rapide"
|
||||
#2011# "Echec de l'ouverture de l'EEPROM"
|
||||
#2012# "Echec de l'ouverture de la flash RAM"
|
||||
#2013# "Echec de l'ouverture du mempak"
|
||||
#2014# "La tentative d'ouverture du fichier zip a échoué.
|
||||
|
||||
Fichier zip manquant ou corrompu - vérifiez le chemin et le fichier."
|
||||
#2015# "La tentative d'ouverture du fichier a échoué."
|
||||
#2016# "Une erreur s'est produite en essayant d'ouvrir le fichier zip."
|
||||
#2017# "Le fichier chargé ne semble pas être une ROM N64 valide.
|
||||
|
||||
Vérifiez vos ROMs avec GoodN64."
|
||||
#2000# "*** CPU EN PAUSE ***"
|
||||
#2001# "Reprise du CPU"
|
||||
#2002# "Dans une boucle permanente dont il est impossible de sortir.\nL’émulation va maintenant s’arrêter.\n\nVérifiez la ROM et les paramètres de la ROM."
|
||||
#2003# "L’allocation de mémoire a échoué"
|
||||
#2004# "Le plugin vidéo sélectionné ou par défaut est manquant ou invalide.\n\nVous devez aller dans les paramètres et sélectionner un plugin vidéo (graphique).\nVérifiez que vous avez au moins un fichier plugin compatible dans votre répertoire de plugins."
|
||||
#2005# "Le plugin audio sélectionné ou par défaut est manquant ou invalide.\n\nVous devez aller dans les paramètres et sélectionner un plugin audio (son).\nVérifiez que vous avez au moins un fichier plugin compatible dans votre répertoire de plugins."
|
||||
#2006# "Le plugin RSP sélectionné ou par défaut est manquant ou invalide.\n\nVous devez aller dans les paramètres et sélectionner un plugin RSP (Reality Signal Processor).\nVérifiez que vous avez au moins un fichier plugin compatible dans votre répertoire de plugins."
|
||||
#2007# "Le plugin input sélectionné ou par défaut est manquant ou invalide.\n\nVous devez aller dans les paramètres et sélectionner un plugin input (contrôleur).\nVérifiez que vous avez au moins un fichier plugin compatible dans votre répertoire de plugins."
|
||||
#2008# "Échec du chargement du plugin :"
|
||||
#2009# "Échec du chargement word.\n\nVérifier la ROM et les paramètres de la ROM."
|
||||
#2010# "Échec à l’ouverture du fichier de sauvegarde"
|
||||
#2011# "Échec à l’ouverture de l’EEPROM"
|
||||
#2012# "Échec à l’ouverture de la RAM flash"
|
||||
#2013# "Échec à l’ouverture du mempak"
|
||||
#2014# "La tentative d’ouverture du fichier zip a échoué.\n\nIl est possible que le fichier zip soit corrompu – essayez de décompresser la ROM manuellement."
|
||||
#2015# "La tentative d’ouverture du fichier a échoué."
|
||||
#2016# "Une erreur s’est produite pendant l’ouverture du fichier zip."
|
||||
#2017# "Le fichier chargé ne semble pas être une ROM N64 valide.\n\nVérifiez vos ROM avec GoodN64."
|
||||
#2018# "Pays inconnu"
|
||||
#2019# "Puce CIC inconnue"
|
||||
#2019# "Puce CIC inconnu"
|
||||
#2020# "Format de fichier inconnu"
|
||||
#2021# "Action sur la mémoire inconnue
|
||||
|
||||
Arrêt de l'émulation"
|
||||
#2022# "OpCode R4300i non pris en charge à"
|
||||
#2023# "Exécution à partir d'un espace non mappé.
|
||||
|
||||
Vérifiez la ROM et ces réglages."
|
||||
#2024# "La sauvegarde rapide ne semble pas correspondre à la ROM actuelle.
|
||||
|
||||
Les sauvegardes rapides doivent être sauvegardées et chargées à partir d'une ROM
|
||||
100% identique, le pays et la version doivent être les mêmes en particulier.
|
||||
Le chargement de cette sauvegarde rapide pourrait causer un plantage du jeu/émulateur.
|
||||
|
||||
Êtes-vous sur de vouloir continuer à charger ?"
|
||||
#2025# "Erreur de l'application/noyau"
|
||||
#2026# "Séquence du 'copyright' non trouvée dans le 'LUT'. Le jeu ne va plus fonctionner."
|
||||
#2027# "Echec de la protection contre la copie"
|
||||
#2028# "Changer un plugin nécessite que Project64 redémarre la ROM chargée.
|
||||
Si vous ne voulez pas perdre votre partie, répondez Non et réalisez une sauvegarde rapide d'abord.
|
||||
|
||||
Changer les plugins et redémarrer le jeu maintenant ?"
|
||||
#2021# "Action de la mémoire inconnue\n\nL’émulation s’est arrêtée."
|
||||
#2022# "Opcode R4300i non pris en charge à"
|
||||
#2023# "Exécution depuis un espace non mappé.\n\nVérifiez la ROM et les paramètres de ROM."
|
||||
#2024# "Cette sauvegarde d’état ne semble pas correspondre à la ROM qui est lancée.\n\nLes états sauvegardés et chargés doivent être à 100 % identiques à la ROM.\nEn particulier la RÉGION et la VERSION doivent être identiques.\nLe chargement de cette sauvegarde va probablement faire planter le jeu ou l’émulateur.\n\nSouhaitez-vous le charger quand même ?"
|
||||
#2025# "Erreur"
|
||||
#2026# "La séquence de copyright n’a pas été trouvé dans la LUT. Le jeu ne fonctionnera plus."
|
||||
#2027# "Échec de la protection de copie"
|
||||
#2028# "Changer un plugin nécessite que Project64 redémarre la ROM lancée.\nSi vous ne voulez pas perdre votre progression, répondez non et sauvegardez l’état actuel d’abord.\n\nChanger les plugins et redémarrer maintenant ?"
|
||||
#2029# "Changer les plugins"
|
||||
#2030# "Emulation terminée"
|
||||
#2031# "Emulation démarrée"
|
||||
#2032# "Impossible de charger la sauvegarde rapide"
|
||||
#2033# "Chargement effectué :"
|
||||
#2034# "Sauvegarde effectuée :"
|
||||
#2035# "Numéro actuel de la sauvegarde rapide"
|
||||
#2036# "'Byteswapping' de la ROM"
|
||||
#2037# "Attente du choix d'une ROM"
|
||||
#2038# "Chargée"
|
||||
#2039# "Chargement de la ROM"
|
||||
#2040# "Vous ne pouvez pas ouvrir une ROM si tous les plugins (Vidéo, Audio, Contrôles & RSP) ne sont pas initialisés"
|
||||
#2041# "Êtes-vous sur de vouloir effacer ce code ?"
|
||||
#2042# "Effacer le code"
|
||||
#2043# "Nom du code déjà utilisé, utilisez un autre nom"
|
||||
#2044# "Vous avez atteint le nombre maximum de codes triche pour ce jeu"
|
||||
#2030# "Émulation terminée"
|
||||
#2031# "Émulation démarrée"
|
||||
#2032# "Impossible de charger l’état"
|
||||
#2033# "État chargé"
|
||||
#2034# "État sauvegardé vers"
|
||||
#2035# "Emplacement d’état"
|
||||
#2036# "Byte-swapping image"
|
||||
#2037# "Choisir une image N64"
|
||||
#2038# "Chargé"
|
||||
#2039# "Chargement de l’image"
|
||||
#2040# "Impossible d’ouvrir une ROM car les plugins n’ont pas été initialisés."
|
||||
#2041# "Êtes-vous sûr de vouloir effacer ceci ?"
|
||||
#2042# "Effacer le cheat"
|
||||
#2043# "Le nom du cheat est déjà utilisé."
|
||||
#2044# "Vous avez atteint le nombre maximum de codes cheats pour ce jeu"
|
||||
#2045# "Initialisation du plugin"
|
||||
#2046# "Vous n’avez pas sélectionné de touche virtuelle à assigner à l’entrée de menu."
|
||||
#2047# "Vous avez besoin de sélectionner une entrée de menu à laquelle assigner cette touche."
|
||||
#2048# "Le raccourci a déjà été assigné à une autre entrée de menu."
|
||||
#2049# "Aucun raccourci n’a été sélectionné pour être supprimé."
|
||||
#2050# "ROM chargée. Émulation en attente de lancement."
|
||||
#2051# "Project64 beta est réservé aux membres seulement.\n\nSi vous avez un compte sur pj64-emu.com, vous ne devriez pas voir cette erreur !!\nVeuillez nous contacter sur le site."
|
||||
#2052# "Erreur du programme"
|
||||
#2053# "Impossible de trouver le nom de fichier dans l’archive 7z"
|
||||
#2054# "Émulation des graphismes bas niveau (LLE)"
|
||||
#2055# "Les graphismes LLE ne sont pas à utiliser par tout le monde !!!\nIl est recommandé d’utiliser seulement ceci à des fins de test et non pour jouer.\n\nChanger pour les graphismes en mode LLE ?"
|
||||
#2056# "Émulation audio haut niveau (HLE)"
|
||||
#2057# "L’audio HLE nécessite un plugin tiers !!!\nSi vous n’utilisez pas un plugin audio tiers qui supporte le HLE, vous n’entendrez aucun son.\n\nChanger pour l’audio en mode HLE ?"
|
||||
|
|
|
@ -177,7 +177,7 @@
|
|||
#320# "ロムディレクトリを選択して下さい"
|
||||
|
||||
//Messages
|
||||
#340# "不明なロム? GoodN64を使用するかINIファイルをアップデートして下さい"
|
||||
#340# "不明なロム? GoodN64を使用するかRDBファイルをアップデートして下さい"
|
||||
|
||||
/*********************************************************************************
|
||||
* Options *
|
||||
|
@ -233,9 +233,9 @@
|
|||
#466# "表示形式によってフレームレートを変更する:"
|
||||
|
||||
//ROM Browser Tab
|
||||
#480# "最近開いたロムファイルの表示する数(最大10):"
|
||||
#480# "最近開いたロムファイルの表示する数(0~10):"
|
||||
#481# "個"
|
||||
#482# "最近開いたロムフォルダの表示する数(最大10):"
|
||||
#482# "最近開いたロムフォルダの表示する数(0~10):"
|
||||
#483# "個"
|
||||
#484# "ロムブラウザを使用する(&U)"
|
||||
#485# "サブフォルダも検索(&S)"
|
||||
|
@ -282,6 +282,9 @@
|
|||
#534# "関数検索方法:"
|
||||
#535# "カスタム自己書換方法"
|
||||
#536# "オーディオに同期"
|
||||
#537# "AIカウント/バイト"
|
||||
#538# "32bitエンジン"
|
||||
#539# "DP割り込み遅延"
|
||||
|
||||
//Core Styles
|
||||
#540# "インタプリタ"
|
||||
|
@ -348,6 +351,11 @@
|
|||
#710# "スピードを上げる"
|
||||
#711# "スピードを下げる"
|
||||
|
||||
//Bottom page buttons
|
||||
#720# "この項目のリセット"
|
||||
#721# "すべてリセット"
|
||||
#722# "適用"
|
||||
|
||||
/*********************************************************************************
|
||||
* ROM Information *
|
||||
*********************************************************************************/
|
||||
|
@ -359,7 +367,7 @@
|
|||
#802# "ファイル名:"
|
||||
#803# "保存場所:"
|
||||
#804# "ロムサイズ:"
|
||||
#805# "カートリッジID:"
|
||||
#805# "カートリッジID:"
|
||||
#806# "製造元:"
|
||||
#807# "国情報:"
|
||||
#808# "CRC1:"
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
#1 # "Español" // LANGUAGE ID
|
||||
#2 # "MELERIX" // Author
|
||||
#3 # "2.2" // Version
|
||||
#4 # "March, 2015" // Date
|
||||
#4 # "April, 2015" // Date
|
||||
|
||||
//About DLL Dialog
|
||||
#5 # "Lenguaje Actual"
|
||||
#6 # "Autor"
|
||||
#7 # "Versión"
|
||||
#8 # "Fecha"
|
||||
#9 # "Visitar la Pagina Principal"
|
||||
#9 # "Visitar la Página Principal"
|
||||
#10 # "Base de datos de ROMs (.RDB)"
|
||||
#11 # "Archivo de Códigos de Trucos (.CHT)"
|
||||
#12 # "Información Extendida del ROM (.RDX)"
|
||||
|
@ -131,7 +131,7 @@
|
|||
#268# "Hacer que la ventana quede por encima las demás ventanas"
|
||||
#269# "Cambiar ajustes dentro del plugin de gráficos"
|
||||
#270# "Cambiar ajustes dentro del plugin de audio"
|
||||
#271# "Cambiar ajustes dentro del plugin de control (es decir definir las teclas)"
|
||||
#271# "Cambiar ajustes dentro del plugin de control (es decir, definir las teclas)"
|
||||
#272# "Cambiar ajustes dentro del plugin de RSP"
|
||||
#273# "Mostrar uso de CPU del emulador dividido sobre diferentes recursos"
|
||||
#274# "Ver/cambiar ajustes para esta aplicación"
|
||||
|
@ -177,7 +177,7 @@
|
|||
#320# "Seleccionar directorio de ROMs actual"
|
||||
|
||||
//Messages
|
||||
#340# "ROM Dañado? Usa GoodN64 y comprueba por una RDB actualizada"
|
||||
#340# "¿ROM Dañado? Usa GoodN64 y verifica que la RDB esté actualizada."
|
||||
|
||||
/*********************************************************************************
|
||||
* Options *
|
||||
|
@ -224,7 +224,7 @@
|
|||
#452# "Seleccionar directorio de paquete de texturas"
|
||||
|
||||
//Options Dialog
|
||||
#460# "Pausar emulación cuando la ventana no este activa"
|
||||
#460# "Pausar emulación cuando la ventana no esté activa"
|
||||
#461# "Entrar en modo de pantalla completa al cargar un ROM"
|
||||
#462# "Ocultar ajustes avanzados"
|
||||
#463# "Recordar trucos seleccionados"
|
||||
|
@ -241,7 +241,7 @@
|
|||
#484# "Usar navegador de ROMs"
|
||||
#485# "Usar recursión de directorio"
|
||||
#486# "Campos disponibles:"
|
||||
#487# "Mostrar campos en este orden:"
|
||||
#487# "Orden de campos:"
|
||||
#488# "Agregar ->"
|
||||
#489# "<- Remover"
|
||||
#490# "Arriba"
|
||||
|
@ -254,7 +254,7 @@
|
|||
#502# "Estilo de núcleo del CPU:"
|
||||
#503# "Métodos self mod:"
|
||||
#504# "Tamaño de memoria predeterminado:"
|
||||
#505# "Vinculación avanzada de bloques:"
|
||||
#505# "Vinculación avanzada de bloques"
|
||||
#506# "Iniciar emulación cuando el ROM sea abierto"
|
||||
#507# "Siempre sustituir los ajustes predeterminados con los de la RDB"
|
||||
#508# "Comprimir automáticamente estados guardados"
|
||||
|
@ -269,7 +269,7 @@
|
|||
#520# "Estilo de núcleo del CPU:"
|
||||
#521# "Frecuencia de actualización de VI:"
|
||||
#522# "Tamaño de memoria:"
|
||||
#523# "Vinculación avanzada de bloques:"
|
||||
#523# "Vinculación avanzada de bloques"
|
||||
#524# "Tipo de guardado predeterminado:"
|
||||
#525# "Factor de contador:"
|
||||
#526# "Buffer de compilación ampliado"
|
||||
|
@ -284,7 +284,7 @@
|
|||
#535# "Método self mod personalizado"
|
||||
#536# "Sincronizar usando audio"
|
||||
#537# "Contador de AI por byte"
|
||||
#538# "Motor de 32-bit"
|
||||
#538# "Motor de 32 bits"
|
||||
#539# "Demorar interrupción DP"
|
||||
|
||||
//Core Styles
|
||||
|
@ -342,6 +342,7 @@
|
|||
#689# "Jugando Juego"
|
||||
#690# "Jugando Juego (en ventana)"
|
||||
#691# "Jugando Juego (pantalla completa)"
|
||||
#692# "Detectar Tecla"
|
||||
|
||||
// Frame Rate Option
|
||||
#700# "Interrupciones verticales por segundo"
|
||||
|
@ -356,6 +357,7 @@
|
|||
#720# "Reiniciar Página"
|
||||
#721# "Reiniciar Todo"
|
||||
#722# "Aplicar"
|
||||
#723# "Cerrar"
|
||||
|
||||
/*********************************************************************************
|
||||
* ROM Information *
|
||||
|
@ -398,7 +400,7 @@
|
|||
//Code extension
|
||||
#1012# "Extensiones de Código"
|
||||
#1013# "Por favor elige un valor a ser usado para:"
|
||||
#1014# "Bien"
|
||||
#1014# "Aceptar"
|
||||
#1015# "Cancelar"
|
||||
|
||||
//Digital Value
|
||||
|
@ -417,7 +419,7 @@
|
|||
//Edit Cheat
|
||||
#1027# "Editar Truco"
|
||||
#1028# "Actualizar Truco"
|
||||
#1029# "El Truco ha sido cambiado.\n\nQuieres actualizar?"
|
||||
#1029# "El Truco ha sido cambiado.\n\n¿Deseas actualizar?"
|
||||
#1030# "Truco actualizado"
|
||||
|
||||
//Cheat Popup Menu
|
||||
|
@ -427,7 +429,7 @@
|
|||
|
||||
// short-cut editor
|
||||
#1100# "Reiniciar accesos directos"
|
||||
#1101# "Estás seguro de que quieres reiniciar los accesos directos?\n\nEsta acción no se puede deshacer."
|
||||
#1101# "¿Estás seguro de que quieres reiniciar los accesos directos?\n\nEsta acción no se puede deshacer."
|
||||
#1102# "Menú de Archivo"
|
||||
#1103# "Menú de Sistema"
|
||||
#1104# "Opciones"
|
||||
|
@ -438,33 +440,33 @@
|
|||
*********************************************************************************/
|
||||
#2000# "*** CPU PAUSADO ***"
|
||||
#2001# "CPU Reanudado"
|
||||
#2002# "En un bucle permanente que no se puede salir. \nLa Emulación ahora se detendrá. \n\nComprueba el ROM y los Ajustes del ROM."
|
||||
#2002# "En un bucle permanente del que no se puede salir.\nLa Emulación se detendrá ahora.\n\nComprueba el ROM y sus ajustes."
|
||||
#2003# "Error al asignar memoria"
|
||||
#2004# "El plugin predeterminado o seleccionado de vídeo falta o es invalido. \n\nNecesitas entrar en Ajustes y seleccionar un plugin de vídeo (gráficos).\nComprueba que tengas al menos un archivo de plugin compatible en tu carpeta de plugins."
|
||||
#2005# "El plugin predeterminado o seleccionado de audio falta o es invalido. \n\nNecesitas entrar en Ajustes y seleccionar un plugin de audio (sonido).\nComprueba que tengas al menos un archivo de plugin compatible en tu carpeta de plugins."
|
||||
#2006# "El plugin predeterminado o seleccionado de RSP falta o es invalido. \n\nNecesitas entrar en Ajustes y seleccionar un plugin RSP (Reality Signal Processor).\nComprueba que tengas al menos un archivo de plugin compatible en tu carpeta de plugins."
|
||||
#2007# "El plugin predeterminado o seleccionado de entrada falta o es invalido. \n\nNecesitas entrar en Ajustes y seleccionar un plugin de vídeo (gráficos).\nComprueba que tengas al menos un archivo de plugin compatible en tu carpeta de plugins."
|
||||
#2004# "El plugin predeterminado o seleccionado de vídeo no se encuentra o es inválido.\n\nNecesitas entrar en Ajustes y seleccionar un plugin de vídeo (gráficos).\nComprueba que tengas al menos un archivo de plugin compatible en tu carpeta de plugins."
|
||||
#2005# "El plugin predeterminado o seleccionado de audio no se encuentra o es inválido.\n\nNecesitas entrar en Ajustes y seleccionar un plugin de audio (sonido).\nComprueba que tengas al menos un archivo de plugin compatible en tu carpeta de plugins."
|
||||
#2006# "El plugin predeterminado o seleccionado de RSP no se encuentra o es inválido.\n\nNecesitas entrar en Ajustes y seleccionar un plugin RSP (Reality Signal Processor).\nComprueba que tengas al menos un archivo de plugin compatible en tu carpeta de plugins."
|
||||
#2007# "El plugin predeterminado o seleccionado de entrada no se encuentra o es inválido.\n\nNecesitas entrar en Ajustes y seleccionar un plugin de entrada (controles).\nComprueba que tengas al menos un archivo de plugin compatible en tu carpeta de plugins."
|
||||
#2008# "Error al cargar plugin:"
|
||||
#2009# "Error al cargar palabra\n\nComprueba el ROM y los ajustes del ROM."
|
||||
#2010# "Error al abrir el archivo de guardado"
|
||||
#2011# "Error al abrir EEPROM"
|
||||
#2012# "Error al abrir flash RAM"
|
||||
#2013# "Error al abrir mempak"
|
||||
#2014# "Intento de abrir el archivo zip fallido. \n\nProbablemente un archivo zip corrupto - prueba descomprimir el ROM manualmente."
|
||||
#2015# "Intento de abrir el archivo fallido."
|
||||
#2016# "Ocurrió un error cuando se intentaba abrir el archivo zip."
|
||||
#2017# "El archivo cargado no parece ser un ROM de N64 valido. \n\nComprueba tus ROMs con GoodN64."
|
||||
#2014# "Error al intentar abrir el archivo ZIP.\n\nEl archivo podría estar corrupto - Intenta descomprimir el ROM manualmente."
|
||||
#2015# "Error al intentar abrir el archivo."
|
||||
#2016# "Ocurrió un error cuando se intentaba abrir el archivo ZIP."
|
||||
#2017# "El archivo cargado no parece ser un ROM de N64 válido. \n\nVerifica tus ROMs con GoodN64."
|
||||
#2018# "País desconocido"
|
||||
#2019# "Chip CIC desconocido"
|
||||
#2020# "Formato de archivo desconocido"
|
||||
#2021# "Acción de memoria desconocida\n\nEmulación detenida"
|
||||
#2022# "OpCode R4300i no manejado en"
|
||||
#2023# "Ejecutando desde un espacio no-mapeado.\n\nComprueba el ROM y los ajustes del ROM."
|
||||
#2024# "Este estado guardado no parece coincidir con el ROM en ejecución. \n\nLos estados deben ser guardados y cargados entre ROMs 100% idénticos. \nEn particular la REGION y VERSION necesita ser la misma. \nCargar esta estado es probable que cause al juego y/o al emulador se bloquee. \n\nEstás seguro de que quieres continuar cargando?"
|
||||
#2023# "Ejecutando desde un espacio no mapeado.\n\nComprueba el ROM y los ajustes del ROM."
|
||||
#2024# "Este estado guardado no coincide con el ROM en ejecución.\n\nLos estados deben ser guardados y cargados entre ROMs 100% idénticos.\nEn particular, la REGIÓN y VERSIÓN necesita ser la misma.\nCargar esta estado podría causar que el juego y/o emulador se bloqueen.\n\n¿Estás seguro de que quieres continuar cargando?"
|
||||
#2025# "Error"
|
||||
#2026# "Secuencia de copyright no encontrada en el LUT. El Juego ya no funcionara."
|
||||
#2026# "Secuencia de copyright no encontrada en el LUT. El juego ya no funcionará."
|
||||
#2027# "Falla en la Protección de Copia"
|
||||
#2028# "Cambiar un plugin requiere que Project64 reinicie un ROM en ejecución. \nSi no quieres perder tu posición, responde No y guarda el estado actual primero. \n\nCambiar plugins y reiniciar el ROM ahora?"
|
||||
#2028# "Cambiar un plugin requiere que Project64 reinicie un ROM en ejecución.\nSi no quieres perder tu posición, responde No y guarda el estado actual primero.\n\n¿Cambiar plugins y reiniciar el ROM ahora?"
|
||||
#2029# "Cambiar Plugins"
|
||||
#2030# "Emulación finalizada"
|
||||
#2031# "Emulación iniciada"
|
||||
|
@ -477,20 +479,20 @@
|
|||
#2038# "Cargada"
|
||||
#2039# "Cargando imagen"
|
||||
#2040# "No se puede abrir un ROM porque los plugins no se han inicializado correctamente."
|
||||
#2041# "Estás seguro de que realmente quieres borrar esto?"
|
||||
#2041# "¿Estás seguro de que realmente quieres borrar esto?"
|
||||
#2042# "Borrar Truco"
|
||||
#2043# "El nombre del truco ya está en uso."
|
||||
#2044# "Haz alcanzado la cantidad máxima de trucos para este ROM."
|
||||
#2045# "Inicializando el plugin"
|
||||
#2046# "No has seleccionado una tecla virtual para asignarla al elemento del menú."
|
||||
#2047# "Necesitas seleccionar un elemento del menú para asignarle esta tecla a."
|
||||
#2046# "No has seleccionado una tecla virtual para asignar al elemento del menú."
|
||||
#2047# "Necesitas seleccionar un elemento del menú al cual asignarle esta tecla."
|
||||
#2048# "El acceso directo ya está asignado a otro elemento del menú."
|
||||
#2049# "Ningún acceso directo ha sido seleccionado para ser removido."
|
||||
#2050# "ROM cargada. Esperando por la emulación para iniciar."
|
||||
#2051# "Project64 beta es solo para miembros.\n\nSi tienes una cuenta en pj64.net, no deberías estar viendo este error!!\nPor favor contacta con nosotros en el sitio."
|
||||
#2050# "ROM cargado. Esperando el inicio de la emulación."
|
||||
#2051# "Project64 Beta es sólo para miembros.\n\n¡¡Si tienes una cuenta en pj64-emu.com, no deberías estar viendo este error!!\nPor favor contacta con nosotros en el sitio."
|
||||
#2052# "Error del Programa"
|
||||
#2053# "Fallo al encontrar el nombre de archivo en archivo 7z"
|
||||
#2054# "Gráficos de Emulación de Bajo Nivel"
|
||||
#2055# "Los Gráficos LLE no son para uso general!!!\nEs aconsejable que tu solo uses esto para pruebas, y no para jugar juegos.\n\nCambiar a Gráficos LLE?"
|
||||
#2055# "¡¡¡Los Gráficos LLE no son para uso general!!!\nEs aconsejable que sólo uses esto para pruebas, y no para jugar juegos.\n\n¿Cambiar a Gráficos LLE?"
|
||||
#2056# "Audio de Emulación de Alto Nivel"
|
||||
#2057# "El Audio HLE requiere un plugin de terceros!!!\nSi no usas un plugin de audio terceros que soporte HLE, no oirás ningún sonido.\n\nCambiar a Audio HLE?"
|
||||
#2057# "¡¡¡El Audio HLE requiere un plugin de terceros!!!\nSi no usas un plugin de audio terceros que soporte HLE, no oirás ningún sonido.\n\n¿Cambiar a Audio HLE?"
|
||||
|
|
Binary file not shown.
|
@ -39,6 +39,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Glide64", "Source\Glide64\G
|
|||
{25A25249-C284-4C5A-8DC2-26FC3EB13703} = {25A25249-C284-4C5A-8DC2-26FC3EB13703}
|
||||
{B4A4B994-9111-42B1-93C2-6F1CA8BC4421} = {B4A4B994-9111-42B1-93C2-6F1CA8BC4421}
|
||||
{2DADDAA5-0F57-46ED-A974-747908DDC7F3} = {2DADDAA5-0F57-46ED-A974-747908DDC7F3}
|
||||
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}
|
||||
{8B9961B1-88D9-4EA3-A752-507A00DD9F3D} = {8B9961B1-88D9-4EA3-A752-507A00DD9F3D}
|
||||
{427F1DCD-3BED-4010-9322-077A4C06D871} = {427F1DCD-3BED-4010-9322-077A4C06D871}
|
||||
{93CFEDF3-9A75-4484-B169-D9D8074F5AC2} = {93CFEDF3-9A75-4484-B169-D9D8074F5AC2}
|
||||
|
@ -79,6 +80,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SortRdb", "Source\SortRdb\S
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PJ64 NRage", "Source\nragev20\NRage_Input_V2.vcproj", "{FD617E80-9E40-4138-85DA-B94633972E6A}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2", "Source\3rd Party\sdl\sdl2.vcproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
|
@ -156,6 +159,10 @@ Global
|
|||
{FD617E80-9E40-4138-85DA-B94633972E6A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FD617E80-9E40-4138-85DA-B94633972E6A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{FD617E80-9E40-4138-85DA-B94633972E6A}.Release|Win32.Build.0 = Release|Win32
|
||||
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -165,6 +172,7 @@ Global
|
|||
{731BD205-2826-4631-B7AF-117658E88DBC} = {AA8F7F8E-5377-4911-859D-8A8817B0DB26}
|
||||
{1379F817-7E3D-4F58-9C22-7E364E46E842} = {AA8F7F8E-5377-4911-859D-8A8817B0DB26}
|
||||
{3326E128-33AF-422C-BB7C-67CC6B915610} = {AA8F7F8E-5377-4911-859D-8A8817B0DB26}
|
||||
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {AA8F7F8E-5377-4911-859D-8A8817B0DB26}
|
||||
{462C2608-182F-452C-944F-AF201E19300B} = {9FE699A5-41C3-4441-92AB-639B3D77DE26}
|
||||
{A4D13408-A794-4199-8FC7-4A9A32505005} = {9FE699A5-41C3-4441-92AB-639B3D77DE26}
|
||||
{2DADDAA5-0F57-46ED-A974-747908DDC7F3} = {9FE699A5-41C3-4441-92AB-639B3D77DE26}
|
||||
|
|
|
@ -1,140 +0,0 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.31101.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3rd Party", "3rd Party", "{AA8F7F8E-5377-4911-859D-8A8817B0DB26}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "wxWidgets", "wxWidgets", "{1379F817-7E3D-4F58-9C22-7E364E46E842}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Glide", "Glide", "{9FE699A5-41C3-4441-92AB-639B3D77DE26}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "Source\Common\Common.vcxproj", "{B4A4B994-9111-42B1-93C2-6F1CA8BC4421}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Project64", "Source\Project64\Project64.vcxproj", "{7E534C8E-1ACE-4A88-8807-39A11ED4DA18}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{FD617E80-9E40-4138-85DA-B94633972E6A} = {FD617E80-9E40-4138-85DA-B94633972E6A}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RSP", "Source\RSP\RSP.vcxproj", "{A7ED562C-63F3-4B7E-B6B3-2CF7848752E1}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Settings", "Source\Settings\Settings.vcxproj", "{8B9961B1-88D9-4EA3-A752-507A00DD9F3D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "7zip", "Source\3rd Party\7zip\7zip.vcxproj", "{3326E128-33AF-422C-BB7C-67CC6B915610}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WTL", "Source\3rd Party\WTL\WTL.vcxproj", "{4BC6906B-213E-40D7-9FC7-1A93E228393D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "Source\3rd Party\zlib\zlib.vcxproj", "{731BD205-2826-4631-B7AF-117658E88DBC}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Project64Setup", "Source\Installer\Installer.vcxproj", "{360A34F3-3172-4B09-8BC9-B3FBEE677863}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Glide64", "Source\Glide64\Glide64.vcxproj", "{A4D13408-A794-4199-8FC7-4A9A32505005}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core", "Source\3rd Party\wx\wx_core.vcxproj", "{93447136-FACD-4740-8F35-FC46FB4A9E82}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "base", "Source\3rd Party\wx\wx_base.vcxproj", "{427F1DCD-3BED-4010-9322-077A4C06D871}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxjpeg", "Source\3rd Party\wx\wx_wxjpeg.vcxproj", "{93CFEDF3-9A75-4484-B169-D9D8074F5AC2}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxpng", "Source\3rd Party\wx\wx_wxpng.vcxproj", "{05B9CB11-12D1-47CD-8E4A-88E12162119B}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxzlib", "Source\3rd Party\wx\wx_wxzlib.vcxproj", "{25A25249-C284-4C5A-8DC2-26FC3EB13703}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Glitch64", "Source\Glitch64\Glitch64.vcxproj", "{462C2608-182F-452C-944F-AF201E19300B}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GlideHQ", "Source\GlideHQ\GlideHQ.vcxproj", "{2DADDAA5-0F57-46ED-A974-747908DDC7F3}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PJ64 NRage", "Source\nragev20\NRage_Input_V2.vcxproj", "{FD617E80-9E40-4138-85DA-B94633972E6A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B4A4B994-9111-42B1-93C2-6F1CA8BC4421}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B4A4B994-9111-42B1-93C2-6F1CA8BC4421}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{B4A4B994-9111-42B1-93C2-6F1CA8BC4421}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B4A4B994-9111-42B1-93C2-6F1CA8BC4421}.Release|Win32.Build.0 = Release|Win32
|
||||
{7E534C8E-1ACE-4A88-8807-39A11ED4DA18}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{7E534C8E-1ACE-4A88-8807-39A11ED4DA18}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{7E534C8E-1ACE-4A88-8807-39A11ED4DA18}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{7E534C8E-1ACE-4A88-8807-39A11ED4DA18}.Release|Win32.Build.0 = Release|Win32
|
||||
{A7ED562C-63F3-4B7E-B6B3-2CF7848752E1}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{A7ED562C-63F3-4B7E-B6B3-2CF7848752E1}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{A7ED562C-63F3-4B7E-B6B3-2CF7848752E1}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{A7ED562C-63F3-4B7E-B6B3-2CF7848752E1}.Release|Win32.Build.0 = Release|Win32
|
||||
{8B9961B1-88D9-4EA3-A752-507A00DD9F3D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8B9961B1-88D9-4EA3-A752-507A00DD9F3D}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8B9961B1-88D9-4EA3-A752-507A00DD9F3D}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8B9961B1-88D9-4EA3-A752-507A00DD9F3D}.Release|Win32.Build.0 = Release|Win32
|
||||
{3326E128-33AF-422C-BB7C-67CC6B915610}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{3326E128-33AF-422C-BB7C-67CC6B915610}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{3326E128-33AF-422C-BB7C-67CC6B915610}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{3326E128-33AF-422C-BB7C-67CC6B915610}.Release|Win32.Build.0 = Release|Win32
|
||||
{4BC6906B-213E-40D7-9FC7-1A93E228393D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{4BC6906B-213E-40D7-9FC7-1A93E228393D}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{4BC6906B-213E-40D7-9FC7-1A93E228393D}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{4BC6906B-213E-40D7-9FC7-1A93E228393D}.Release|Win32.Build.0 = Release|Win32
|
||||
{731BD205-2826-4631-B7AF-117658E88DBC}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{731BD205-2826-4631-B7AF-117658E88DBC}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{731BD205-2826-4631-B7AF-117658E88DBC}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{731BD205-2826-4631-B7AF-117658E88DBC}.Release|Win32.Build.0 = Release|Win32
|
||||
{360A34F3-3172-4B09-8BC9-B3FBEE677863}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{360A34F3-3172-4B09-8BC9-B3FBEE677863}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{360A34F3-3172-4B09-8BC9-B3FBEE677863}.Release|Win32.Build.0 = Release|Win32
|
||||
{A4D13408-A794-4199-8FC7-4A9A32505005}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{A4D13408-A794-4199-8FC7-4A9A32505005}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{A4D13408-A794-4199-8FC7-4A9A32505005}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{A4D13408-A794-4199-8FC7-4A9A32505005}.Release|Win32.Build.0 = Release|Win32
|
||||
{93447136-FACD-4740-8F35-FC46FB4A9E82}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{93447136-FACD-4740-8F35-FC46FB4A9E82}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{93447136-FACD-4740-8F35-FC46FB4A9E82}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{93447136-FACD-4740-8F35-FC46FB4A9E82}.Release|Win32.Build.0 = Release|Win32
|
||||
{427F1DCD-3BED-4010-9322-077A4C06D871}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{427F1DCD-3BED-4010-9322-077A4C06D871}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{427F1DCD-3BED-4010-9322-077A4C06D871}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{427F1DCD-3BED-4010-9322-077A4C06D871}.Release|Win32.Build.0 = Release|Win32
|
||||
{93CFEDF3-9A75-4484-B169-D9D8074F5AC2}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{93CFEDF3-9A75-4484-B169-D9D8074F5AC2}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{93CFEDF3-9A75-4484-B169-D9D8074F5AC2}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{93CFEDF3-9A75-4484-B169-D9D8074F5AC2}.Release|Win32.Build.0 = Release|Win32
|
||||
{05B9CB11-12D1-47CD-8E4A-88E12162119B}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{05B9CB11-12D1-47CD-8E4A-88E12162119B}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{05B9CB11-12D1-47CD-8E4A-88E12162119B}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{05B9CB11-12D1-47CD-8E4A-88E12162119B}.Release|Win32.Build.0 = Release|Win32
|
||||
{25A25249-C284-4C5A-8DC2-26FC3EB13703}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{25A25249-C284-4C5A-8DC2-26FC3EB13703}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{25A25249-C284-4C5A-8DC2-26FC3EB13703}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{25A25249-C284-4C5A-8DC2-26FC3EB13703}.Release|Win32.Build.0 = Release|Win32
|
||||
{462C2608-182F-452C-944F-AF201E19300B}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{462C2608-182F-452C-944F-AF201E19300B}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{462C2608-182F-452C-944F-AF201E19300B}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{462C2608-182F-452C-944F-AF201E19300B}.Release|Win32.Build.0 = Release|Win32
|
||||
{2DADDAA5-0F57-46ED-A974-747908DDC7F3}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{2DADDAA5-0F57-46ED-A974-747908DDC7F3}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{2DADDAA5-0F57-46ED-A974-747908DDC7F3}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{2DADDAA5-0F57-46ED-A974-747908DDC7F3}.Release|Win32.Build.0 = Release|Win32
|
||||
{FD617E80-9E40-4138-85DA-B94633972E6A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FD617E80-9E40-4138-85DA-B94633972E6A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FD617E80-9E40-4138-85DA-B94633972E6A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{FD617E80-9E40-4138-85DA-B94633972E6A}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{1379F817-7E3D-4F58-9C22-7E364E46E842} = {AA8F7F8E-5377-4911-859D-8A8817B0DB26}
|
||||
{3326E128-33AF-422C-BB7C-67CC6B915610} = {AA8F7F8E-5377-4911-859D-8A8817B0DB26}
|
||||
{4BC6906B-213E-40D7-9FC7-1A93E228393D} = {AA8F7F8E-5377-4911-859D-8A8817B0DB26}
|
||||
{731BD205-2826-4631-B7AF-117658E88DBC} = {AA8F7F8E-5377-4911-859D-8A8817B0DB26}
|
||||
{A4D13408-A794-4199-8FC7-4A9A32505005} = {9FE699A5-41C3-4441-92AB-639B3D77DE26}
|
||||
{93447136-FACD-4740-8F35-FC46FB4A9E82} = {1379F817-7E3D-4F58-9C22-7E364E46E842}
|
||||
{427F1DCD-3BED-4010-9322-077A4C06D871} = {1379F817-7E3D-4F58-9C22-7E364E46E842}
|
||||
{93CFEDF3-9A75-4484-B169-D9D8074F5AC2} = {1379F817-7E3D-4F58-9C22-7E364E46E842}
|
||||
{05B9CB11-12D1-47CD-8E4A-88E12162119B} = {1379F817-7E3D-4F58-9C22-7E364E46E842}
|
||||
{25A25249-C284-4C5A-8DC2-26FC3EB13703} = {1379F817-7E3D-4F58-9C22-7E364E46E842}
|
||||
{462C2608-182F-452C-944F-AF201E19300B} = {9FE699A5-41C3-4441-92AB-639B3D77DE26}
|
||||
{2DADDAA5-0F57-46ED-A974-747908DDC7F3} = {9FE699A5-41C3-4441-92AB-639B3D77DE26}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -1,9 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>12.0.21005.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
|
@ -18,9 +14,6 @@
|
|||
<SmallerTypeCheck>true</SmallerTypeCheck>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<ProfileGuidedDatabase />
|
||||
</Link>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</Midl>
|
||||
|
@ -28,5 +21,4 @@
|
|||
<PreprocessorDefinitions>_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup />
|
||||
</Project>
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="windows-1251"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<VisualStudioPropertySheet
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<VisualStudioPropertySheet
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
|
@ -69,7 +69,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="$(OutDir)\lib\$(ProjectName).lib"
|
||||
OutputFile="$(OutDir)\$(ProjectName).lib"
|
||||
UseUnicodeResponseFiles="true"
|
||||
LinkLibraryDependencies="true"
|
||||
AdditionalLibraryDirectories=""
|
||||
|
|
|
@ -1,13 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="Win32.props" />
|
||||
<Import Project="Platform.props" />
|
||||
<Import Project="Debug.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>12.0.21005.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup />
|
||||
<ItemGroup />
|
||||
</Project>
|
|
@ -1,13 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="Win32.props" />
|
||||
<Import Project="Platform.props" />
|
||||
<Import Project="Release.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>12.0.21005.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup />
|
||||
<ItemGroup />
|
||||
</Project>
|
|
@ -1,29 +1,39 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<PropertyGroup Label="Configuration">
|
||||
<PlatformToolset>v140_xp</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
|
||||
<!-- All platforms settings -->
|
||||
<PropertyGroup>
|
||||
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<ExtensionsToDeleteOnClean>*.obj;*.ilk;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath);$(ExtensionsToDeleteOnClean)</ExtensionsToDeleteOnClean>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<LinkDelaySign>false</LinkDelaySign>
|
||||
<EmbedManifest>true</EmbedManifest>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(ConfigurationType)'=='StaticLibrary'">
|
||||
<OutDir>$(SolutionDir)bin\$(Configuration)\lib\</OutDir>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WIN32;_WIN32;_WINDOWS;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<ROOT>$(SolutionDir)</ROOT>
|
||||
<SRC>$(ROOT)Source\</SRC>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<BuildMacro Include="ROOT">
|
||||
<Value>$(ROOT)</Value>
|
||||
|
@ -32,7 +42,7 @@
|
|||
<Value>$(SRC)</Value>
|
||||
</BuildMacro>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
|
||||
<ItemDefinitionGroup>
|
||||
<BuildLog>
|
||||
<Path>$(IntDir)BuildLog.htm</Path>
|
||||
|
@ -56,11 +66,11 @@
|
|||
<StructMemberAlignment>Default</StructMemberAlignment>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
|
||||
<EnableEnhancedInstructionSet Condition="'$(Platform)'=='Win32'">NoExtensions</EnableEnhancedInstructionSet>
|
||||
<EnableEnhancedInstructionSet Condition="'$(Platform)'=='Win32' AND ('$(PlatformToolset)'=='v90' OR '$(PlatformToolset)'=='v100')">NotSet</EnableEnhancedInstructionSet>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>
|
||||
<FloatingPointExceptions>false</FloatingPointExceptions>
|
||||
<DisableLanguageExtensions>false</DisableLanguageExtensions>
|
||||
<AdditionalOptions />
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
|
@ -69,13 +79,11 @@
|
|||
<PrecompiledHeaderFile>StdAfx.h</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||
<ExpandAttributedSource>false</ExpandAttributedSource>
|
||||
<AssemblerOutput />
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)vc90.pdb</ProgramDataBaseFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)vc$(VisualStudioVersion).pdb</ProgramDataBaseFileName>
|
||||
<GenerateXMLDocumentationFiles>false</GenerateXMLDocumentationFiles>
|
||||
<XMLDocumentationFileName>$(IntDir)</XMLDocumentationFileName>
|
||||
<BrowseInformation />
|
||||
<BrowseInformationFile>$(IntDir)</BrowseInformationFile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
|
@ -91,7 +99,7 @@
|
|||
<ErrorReporting>Prompt</ErrorReporting>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)$(ProjectName).lib</OutputFile>
|
||||
<OutputFile>$(OutDir)$(TargetName).lib</OutputFile>
|
||||
<UseUnicodeResponseFiles>true</UseUnicodeResponseFiles>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
|
@ -113,7 +121,6 @@
|
|||
<IgnoreEmbeddedIDL>false</IgnoreEmbeddedIDL>
|
||||
<TypeLibraryResourceID>1</TypeLibraryResourceID>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AssemblyDebug />
|
||||
<ProgramDatabaseFile>$(TargetDir)pdb/$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<GenerateMapFile>true</GenerateMapFile>
|
||||
<MapFileName>$(TargetDir)map/$(TargetName).map</MapFileName>
|
||||
|
@ -122,18 +129,14 @@
|
|||
<HeapCommitSize>0</HeapCommitSize>
|
||||
<StackReserveSize>0</StackReserveSize>
|
||||
<StackCommitSize>0</StackCommitSize>
|
||||
<LargeAddressAware />
|
||||
<TerminalServerAware />
|
||||
<SwapRunFromCD>false</SwapRunFromCD>
|
||||
<SwapRunFromNET>false</SwapRunFromNET>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<ProfileGuidedDatabase />
|
||||
<NoEntryPoint>false</NoEntryPoint>
|
||||
<SetChecksum>false</SetChecksum>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<FixedBaseAddress>false</FixedBaseAddress>
|
||||
<DataExecutionPrevention />
|
||||
<TurnOffAssemblyGeneration>false</TurnOffAssemblyGeneration>
|
||||
<SupportUnloadOfDelayLoadedDLL>false</SupportUnloadOfDelayLoadedDLL>
|
||||
<ImportLibrary>$(TargetDir)lib/$(TargetName).lib</ImportLibrary>
|
||||
|
@ -142,8 +145,6 @@
|
|||
<CLRImageType>Default</CLRImageType>
|
||||
<LinkErrorReporting>PromptImmediately</LinkErrorReporting>
|
||||
<CLRUnmanagedCodeCheck>false</CLRUnmanagedCodeCheck>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<MinimumRequiredVersion />
|
||||
</Link>
|
||||
<Midl>
|
||||
<AdditionalIncludeDirectories>.;$(SRC);$(SRC)\3rd Party;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
|
@ -157,7 +158,6 @@
|
|||
<GenerateTypeLibrary>true</GenerateTypeLibrary>
|
||||
<TypeLibraryName>$(IntDir)%(Filename).tlb</TypeLibraryName>
|
||||
<HeaderFileName>%(Filename)_h.h</HeaderFileName>
|
||||
<DllDataFileName />
|
||||
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||
<EnableErrorChecks>All</EnableErrorChecks>
|
||||
|
@ -191,5 +191,31 @@
|
|||
<OutputFile>$(TargetDir)$(TargetName).xml</OutputFile>
|
||||
</Xdcmake>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup />
|
||||
<!-- END common platform settings -->
|
||||
|
||||
<!-- Win32 -->
|
||||
<ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
|
||||
<Link>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<!-- END Win32 -->
|
||||
|
||||
<!-- x64 -->
|
||||
<PropertyGroup Condition="'$(Platform)'=='x64'">
|
||||
<OutDir>$(SolutionDir)bin\$(Configuration)64\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\$(Configuration)64\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(ConfigurationType)|$(Platform)'=='StaticLibrary|x64'">
|
||||
<OutDir>$(SolutionDir)bin\$(Configuration)64\lib\</OutDir>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemDefinitionGroup Condition="'$(Platform)'=='x64'">
|
||||
<Link>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<!-- END x64 -->
|
||||
|
||||
</Project>
|
|
@ -1,8 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>12.0.21005.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
|
@ -16,9 +13,6 @@
|
|||
<SmallerTypeCheck>false</SmallerTypeCheck>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<ProfileGuidedDatabase />
|
||||
</Link>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</Midl>
|
||||
|
@ -26,5 +20,4 @@
|
|||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup />
|
||||
</Project>
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<VisualStudioPropertySheet
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="windows-1251"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<VisualStudioPropertySheet
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="windows-1251"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<VisualStudioPropertySheet
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="windows-1251"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<VisualStudioPropertySheet
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<VisualStudioPropertySheet
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
|
|
|
@ -5,11 +5,38 @@
|
|||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{3326E128-33AF-422C-BB7C-67CC6B915610}</ProjectGuid>
|
||||
<RootNamespace>7zip</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(SolutionDir)PropertySheets\Platform.$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PrecompiledHeader />
|
||||
<DisableSpecificWarnings>4127;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="7z.h" />
|
||||
<ClInclude Include="7zAlloc.h" />
|
||||
|
@ -81,33 +108,4 @@
|
|||
<ClCompile Include="XzEnc.c" />
|
||||
<ClCompile Include="XzIn.c" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{3326E128-33AF-422C-BB7C-67CC6B915610}</ProjectGuid>
|
||||
<RootNamespace>7zip</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v120_xp</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Project="$(SolutionDir)PropertySheets/Win32.Release.props" />
|
||||
<Import Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Project="$(SolutionDir)PropertySheets/Win32.Debug.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>12.0.21005.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PrecompiledHeader />
|
||||
<DisableSpecificWarnings>4127;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -98,6 +98,7 @@ Stop_Compiling_Bad_Endian
|
|||
#endif
|
||||
|
||||
#if defined(MY_CPU_LE_UNALIGN) && defined(_WIN64) && (_MSC_VER >= 1300)
|
||||
#include <stdlib.h>
|
||||
|
||||
#pragma intrinsic(_byteswap_ulong)
|
||||
#pragma intrinsic(_byteswap_uint64)
|
||||
|
|
|
@ -5,33 +5,32 @@
|
|||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{4BC6906B-213E-40D7-9FC7-1A93E228393D}</ProjectGuid>
|
||||
<RootNamespace>WTL</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v120_xp</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Project="$(SolutionDir)PropertySheets/Win32.Release.props" />
|
||||
<Import Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Project="$(SolutionDir)PropertySheets/Win32.Debug.props" />
|
||||
<Import Project="$(SolutionDir)PropertySheets\Platform.$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>12.0.21005.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ItemGroup>
|
||||
<ClInclude Include="atlapp.h" />
|
||||
<ClInclude Include="atlcrack.h" />
|
||||
|
@ -54,7 +53,4 @@
|
|||
<ClInclude Include="atlwince.h" />
|
||||
<ClInclude Include="atlwinx.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,163 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL.h
|
||||
*
|
||||
* Main include header for the SDL library
|
||||
*/
|
||||
|
||||
/**
|
||||
* \mainpage Simple DirectMedia Layer (SDL)
|
||||
*
|
||||
* http://www.libsdl.org/
|
||||
*
|
||||
* \section intro_sec Introduction
|
||||
*
|
||||
* Simple DirectMedia Layer is a cross-platform development library designed
|
||||
* to provide low level access to audio, keyboard, mouse, joystick, and
|
||||
* graphics hardware via OpenGL and Direct3D. It is used by video playback
|
||||
* software, emulators, and popular games including Valve's award winning
|
||||
* catalog and many Humble Bundle games.
|
||||
*
|
||||
* SDL officially supports Windows, Mac OS X, Linux, iOS, and Android.
|
||||
* Support for other platforms may be found in the source code.
|
||||
*
|
||||
* SDL is written in C, works natively with C++, and there are bindings
|
||||
* available for several other languages, including C# and Python.
|
||||
*
|
||||
* This library is distributed under the zlib license, which can be found
|
||||
* in the file "COPYING.txt".
|
||||
*
|
||||
* The best way to learn how to use SDL is to check out the header files in
|
||||
* the "include" subdirectory and the programs in the "test" subdirectory.
|
||||
* The header files and test programs are well commented and always up to date.
|
||||
* More documentation and FAQs are available online at:
|
||||
* http://wiki.libsdl.org/
|
||||
*
|
||||
* If you need help with the library, or just want to discuss SDL related
|
||||
* issues, you can join the developers mailing list:
|
||||
* http://www.libsdl.org/mailing-list.php
|
||||
*
|
||||
* Enjoy!
|
||||
* Sam Lantinga (slouken@libsdl.org)
|
||||
*/
|
||||
|
||||
#ifndef _SDL_H
|
||||
#define _SDL_H
|
||||
|
||||
#include "SDL_main.h"
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_assert.h"
|
||||
#include "SDL_atomic.h"
|
||||
#include "SDL_audio.h"
|
||||
#include "SDL_clipboard.h"
|
||||
#include "SDL_cpuinfo.h"
|
||||
#include "SDL_endian.h"
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_events.h"
|
||||
#include "SDL_filesystem.h"
|
||||
#include "SDL_joystick.h"
|
||||
#include "SDL_gamecontroller.h"
|
||||
#include "SDL_haptic.h"
|
||||
#include "SDL_hints.h"
|
||||
#include "SDL_loadso.h"
|
||||
#include "SDL_log.h"
|
||||
#include "SDL_messagebox.h"
|
||||
#include "SDL_mutex.h"
|
||||
#include "SDL_power.h"
|
||||
#include "SDL_render.h"
|
||||
#include "SDL_rwops.h"
|
||||
#include "SDL_system.h"
|
||||
#include "SDL_thread.h"
|
||||
#include "SDL_timer.h"
|
||||
#include "SDL_version.h"
|
||||
#include "SDL_video.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* As of version 0.5, SDL is loaded dynamically into the application */
|
||||
|
||||
/**
|
||||
* \name SDL_INIT_*
|
||||
*
|
||||
* These are the flags which may be passed to SDL_Init(). You should
|
||||
* specify the subsystems which you will be using in your application.
|
||||
*/
|
||||
/* @{ */
|
||||
#define SDL_INIT_TIMER 0x00000001
|
||||
#define SDL_INIT_AUDIO 0x00000010
|
||||
#define SDL_INIT_VIDEO 0x00000020 /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
|
||||
#define SDL_INIT_JOYSTICK 0x00000200 /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
|
||||
#define SDL_INIT_HAPTIC 0x00001000
|
||||
#define SDL_INIT_GAMECONTROLLER 0x00002000 /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
|
||||
#define SDL_INIT_EVENTS 0x00004000
|
||||
#define SDL_INIT_NOPARACHUTE 0x00100000 /**< Don't catch fatal signals */
|
||||
#define SDL_INIT_EVERYTHING ( \
|
||||
SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
|
||||
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \
|
||||
)
|
||||
/* @} */
|
||||
|
||||
/**
|
||||
* This function initializes the subsystems specified by \c flags
|
||||
* Unless the ::SDL_INIT_NOPARACHUTE flag is set, it will install cleanup
|
||||
* signal handlers for some commonly ignored fatal signals (like SIGSEGV).
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
|
||||
|
||||
/**
|
||||
* This function initializes specific SDL subsystems
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
|
||||
|
||||
/**
|
||||
* This function cleans up specific SDL subsystems
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
|
||||
|
||||
/**
|
||||
* This function returns a mask of the specified subsystems which have
|
||||
* previously been initialized.
|
||||
*
|
||||
* If \c flags is 0, it returns a mask of all initialized subsystems.
|
||||
*/
|
||||
extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
|
||||
|
||||
/**
|
||||
* This function cleans up all initialized subsystems. You should
|
||||
* call it upon all exit conditions.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_Quit(void);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_H */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,284 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_assert_h
|
||||
#define _SDL_assert_h
|
||||
|
||||
#include "SDL_config.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef SDL_ASSERT_LEVEL
|
||||
#ifdef SDL_DEFAULT_ASSERT_LEVEL
|
||||
#define SDL_ASSERT_LEVEL SDL_DEFAULT_ASSERT_LEVEL
|
||||
#elif defined(_DEBUG) || defined(DEBUG) || \
|
||||
(defined(__GNUC__) && !defined(__OPTIMIZE__))
|
||||
#define SDL_ASSERT_LEVEL 2
|
||||
#else
|
||||
#define SDL_ASSERT_LEVEL 1
|
||||
#endif
|
||||
#endif /* SDL_ASSERT_LEVEL */
|
||||
|
||||
/*
|
||||
These are macros and not first class functions so that the debugger breaks
|
||||
on the assertion line and not in some random guts of SDL, and so each
|
||||
assert can have unique static variables associated with it.
|
||||
*/
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
/* Don't include intrin.h here because it contains C++ code */
|
||||
extern void __cdecl __debugbreak(void);
|
||||
#define SDL_TriggerBreakpoint() __debugbreak()
|
||||
#elif (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)))
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
|
||||
#elif defined(HAVE_SIGNAL_H)
|
||||
#include <signal.h>
|
||||
#define SDL_TriggerBreakpoint() raise(SIGTRAP)
|
||||
#else
|
||||
/* How do we trigger breakpoints on this platform? */
|
||||
#define SDL_TriggerBreakpoint()
|
||||
#endif
|
||||
|
||||
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */
|
||||
# define SDL_FUNCTION __func__
|
||||
#elif ((__GNUC__ >= 2) || defined(_MSC_VER))
|
||||
# define SDL_FUNCTION __FUNCTION__
|
||||
#else
|
||||
# define SDL_FUNCTION "???"
|
||||
#endif
|
||||
#define SDL_FILE __FILE__
|
||||
#define SDL_LINE __LINE__
|
||||
|
||||
/*
|
||||
sizeof (x) makes the compiler still parse the expression even without
|
||||
assertions enabled, so the code is always checked at compile time, but
|
||||
doesn't actually generate code for it, so there are no side effects or
|
||||
expensive checks at run time, just the constant size of what x WOULD be,
|
||||
which presumably gets optimized out as unused.
|
||||
This also solves the problem of...
|
||||
|
||||
int somevalue = blah();
|
||||
SDL_assert(somevalue == 1);
|
||||
|
||||
...which would cause compiles to complain that somevalue is unused if we
|
||||
disable assertions.
|
||||
*/
|
||||
|
||||
#ifdef _MSC_VER /* stupid /W4 warnings. */
|
||||
#define SDL_NULL_WHILE_LOOP_CONDITION (-1 == __LINE__)
|
||||
#else
|
||||
#define SDL_NULL_WHILE_LOOP_CONDITION (0)
|
||||
#endif
|
||||
|
||||
#define SDL_disabled_assert(condition) \
|
||||
do { (void) sizeof ((condition)); } while (SDL_NULL_WHILE_LOOP_CONDITION)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SDL_ASSERTION_RETRY, /**< Retry the assert immediately. */
|
||||
SDL_ASSERTION_BREAK, /**< Make the debugger trigger a breakpoint. */
|
||||
SDL_ASSERTION_ABORT, /**< Terminate the program. */
|
||||
SDL_ASSERTION_IGNORE, /**< Ignore the assert. */
|
||||
SDL_ASSERTION_ALWAYS_IGNORE /**< Ignore the assert from now on. */
|
||||
} SDL_assert_state;
|
||||
|
||||
typedef struct SDL_assert_data
|
||||
{
|
||||
int always_ignore;
|
||||
unsigned int trigger_count;
|
||||
const char *condition;
|
||||
const char *filename;
|
||||
int linenum;
|
||||
const char *function;
|
||||
const struct SDL_assert_data *next;
|
||||
} SDL_assert_data;
|
||||
|
||||
#if (SDL_ASSERT_LEVEL > 0)
|
||||
|
||||
/* Never call this directly. Use the SDL_assert* macros. */
|
||||
extern DECLSPEC SDL_assert_state SDLCALL SDL_ReportAssertion(SDL_assert_data *,
|
||||
const char *,
|
||||
const char *, int)
|
||||
#if defined(__clang__)
|
||||
#if __has_feature(attribute_analyzer_noreturn)
|
||||
/* this tells Clang's static analysis that we're a custom assert function,
|
||||
and that the analyzer should assume the condition was always true past this
|
||||
SDL_assert test. */
|
||||
__attribute__((analyzer_noreturn))
|
||||
#endif
|
||||
#endif
|
||||
;
|
||||
|
||||
/* the do {} while(0) avoids dangling else problems:
|
||||
if (x) SDL_assert(y); else blah();
|
||||
... without the do/while, the "else" could attach to this macro's "if".
|
||||
We try to handle just the minimum we need here in a macro...the loop,
|
||||
the static vars, and break points. The heavy lifting is handled in
|
||||
SDL_ReportAssertion(), in SDL_assert.c.
|
||||
*/
|
||||
#define SDL_enabled_assert(condition) \
|
||||
do { \
|
||||
while ( !(condition) ) { \
|
||||
static struct SDL_assert_data assert_data = { \
|
||||
0, 0, #condition, 0, 0, 0, 0 \
|
||||
}; \
|
||||
const SDL_assert_state state = SDL_ReportAssertion(&assert_data, \
|
||||
SDL_FUNCTION, \
|
||||
SDL_FILE, \
|
||||
SDL_LINE); \
|
||||
if (state == SDL_ASSERTION_RETRY) { \
|
||||
continue; /* go again. */ \
|
||||
} else if (state == SDL_ASSERTION_BREAK) { \
|
||||
SDL_TriggerBreakpoint(); \
|
||||
} \
|
||||
break; /* not retrying. */ \
|
||||
} \
|
||||
} while (SDL_NULL_WHILE_LOOP_CONDITION)
|
||||
|
||||
#endif /* enabled assertions support code */
|
||||
|
||||
/* Enable various levels of assertions. */
|
||||
#if SDL_ASSERT_LEVEL == 0 /* assertions disabled */
|
||||
# define SDL_assert(condition) SDL_disabled_assert(condition)
|
||||
# define SDL_assert_release(condition) SDL_disabled_assert(condition)
|
||||
# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
|
||||
#elif SDL_ASSERT_LEVEL == 1 /* release settings. */
|
||||
# define SDL_assert(condition) SDL_disabled_assert(condition)
|
||||
# define SDL_assert_release(condition) SDL_enabled_assert(condition)
|
||||
# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
|
||||
#elif SDL_ASSERT_LEVEL == 2 /* normal settings. */
|
||||
# define SDL_assert(condition) SDL_enabled_assert(condition)
|
||||
# define SDL_assert_release(condition) SDL_enabled_assert(condition)
|
||||
# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
|
||||
#elif SDL_ASSERT_LEVEL == 3 /* paranoid settings. */
|
||||
# define SDL_assert(condition) SDL_enabled_assert(condition)
|
||||
# define SDL_assert_release(condition) SDL_enabled_assert(condition)
|
||||
# define SDL_assert_paranoid(condition) SDL_enabled_assert(condition)
|
||||
#else
|
||||
# error Unknown assertion level.
|
||||
#endif
|
||||
|
||||
/* this assertion is never disabled at any level. */
|
||||
#define SDL_assert_always(condition) SDL_enabled_assert(condition)
|
||||
|
||||
|
||||
typedef SDL_assert_state (SDLCALL *SDL_AssertionHandler)(
|
||||
const SDL_assert_data* data, void* userdata);
|
||||
|
||||
/**
|
||||
* \brief Set an application-defined assertion handler.
|
||||
*
|
||||
* This allows an app to show its own assertion UI and/or force the
|
||||
* response to an assertion failure. If the app doesn't provide this, SDL
|
||||
* will try to do the right thing, popping up a system-specific GUI dialog,
|
||||
* and probably minimizing any fullscreen windows.
|
||||
*
|
||||
* This callback may fire from any thread, but it runs wrapped in a mutex, so
|
||||
* it will only fire from one thread at a time.
|
||||
*
|
||||
* Setting the callback to NULL restores SDL's original internal handler.
|
||||
*
|
||||
* This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
|
||||
*
|
||||
* \return SDL_assert_state value of how to handle the assertion failure.
|
||||
*
|
||||
* \param handler Callback function, called when an assertion fails.
|
||||
* \param userdata A pointer passed to the callback as-is.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SetAssertionHandler(
|
||||
SDL_AssertionHandler handler,
|
||||
void *userdata);
|
||||
|
||||
/**
|
||||
* \brief Get the default assertion handler.
|
||||
*
|
||||
* This returns the function pointer that is called by default when an
|
||||
* assertion is triggered. This is an internal function provided by SDL,
|
||||
* that is used for assertions when SDL_SetAssertionHandler() hasn't been
|
||||
* used to provide a different function.
|
||||
*
|
||||
* \return The default SDL_AssertionHandler that is called when an assert triggers.
|
||||
*/
|
||||
extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetDefaultAssertionHandler(void);
|
||||
|
||||
/**
|
||||
* \brief Get the current assertion handler.
|
||||
*
|
||||
* This returns the function pointer that is called when an assertion is
|
||||
* triggered. This is either the value last passed to
|
||||
* SDL_SetAssertionHandler(), or if no application-specified function is
|
||||
* set, is equivalent to calling SDL_GetDefaultAssertionHandler().
|
||||
*
|
||||
* \param puserdata Pointer to a void*, which will store the "userdata"
|
||||
* pointer that was passed to SDL_SetAssertionHandler().
|
||||
* This value will always be NULL for the default handler.
|
||||
* If you don't care about this data, it is safe to pass
|
||||
* a NULL pointer to this function to ignore it.
|
||||
* \return The SDL_AssertionHandler that is called when an assert triggers.
|
||||
*/
|
||||
extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puserdata);
|
||||
|
||||
/**
|
||||
* \brief Get a list of all assertion failures.
|
||||
*
|
||||
* Get all assertions triggered since last call to SDL_ResetAssertionReport(),
|
||||
* or the start of the program.
|
||||
*
|
||||
* The proper way to examine this data looks something like this:
|
||||
*
|
||||
* <code>
|
||||
* const SDL_assert_data *item = SDL_GetAssertionReport();
|
||||
* while (item) {
|
||||
* printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\n",
|
||||
* item->condition, item->function, item->filename,
|
||||
* item->linenum, item->trigger_count,
|
||||
* item->always_ignore ? "yes" : "no");
|
||||
* item = item->next;
|
||||
* }
|
||||
* </code>
|
||||
*
|
||||
* \return List of all assertions.
|
||||
* \sa SDL_ResetAssertionReport
|
||||
*/
|
||||
extern DECLSPEC const SDL_assert_data * SDLCALL SDL_GetAssertionReport(void);
|
||||
|
||||
/**
|
||||
* \brief Reset the list of all assertion failures.
|
||||
*
|
||||
* Reset list of all assertions triggered.
|
||||
*
|
||||
* \sa SDL_GetAssertionReport
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_assert_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,260 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_atomic.h
|
||||
*
|
||||
* Atomic operations.
|
||||
*
|
||||
* IMPORTANT:
|
||||
* If you are not an expert in concurrent lockless programming, you should
|
||||
* only be using the atomic lock and reference counting functions in this
|
||||
* file. In all other cases you should be protecting your data structures
|
||||
* with full mutexes.
|
||||
*
|
||||
* The list of "safe" functions to use are:
|
||||
* SDL_AtomicLock()
|
||||
* SDL_AtomicUnlock()
|
||||
* SDL_AtomicIncRef()
|
||||
* SDL_AtomicDecRef()
|
||||
*
|
||||
* Seriously, here be dragons!
|
||||
* ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
*
|
||||
* You can find out a little more about lockless programming and the
|
||||
* subtle issues that can arise here:
|
||||
* http://msdn.microsoft.com/en-us/library/ee418650%28v=vs.85%29.aspx
|
||||
*
|
||||
* There's also lots of good information here:
|
||||
* http://www.1024cores.net/home/lock-free-algorithms
|
||||
* http://preshing.com/
|
||||
*
|
||||
* These operations may or may not actually be implemented using
|
||||
* processor specific atomic operations. When possible they are
|
||||
* implemented as true processor specific atomic operations. When that
|
||||
* is not possible the are implemented using locks that *do* use the
|
||||
* available atomic operations.
|
||||
*
|
||||
* All of the atomic operations that modify memory are full memory barriers.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_atomic_h_
|
||||
#define _SDL_atomic_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_platform.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \name SDL AtomicLock
|
||||
*
|
||||
* The atomic locks are efficient spinlocks using CPU instructions,
|
||||
* but are vulnerable to starvation and can spin forever if a thread
|
||||
* holding a lock has been terminated. For this reason you should
|
||||
* minimize the code executed inside an atomic lock and never do
|
||||
* expensive things like API or system calls while holding them.
|
||||
*
|
||||
* The atomic locks are not safe to lock recursively.
|
||||
*
|
||||
* Porting Note:
|
||||
* The spin lock functions and type are required and can not be
|
||||
* emulated because they are used in the atomic emulation code.
|
||||
*/
|
||||
/* @{ */
|
||||
|
||||
typedef int SDL_SpinLock;
|
||||
|
||||
/**
|
||||
* \brief Try to lock a spin lock by setting it to a non-zero value.
|
||||
*
|
||||
* \param lock Points to the lock.
|
||||
*
|
||||
* \return SDL_TRUE if the lock succeeded, SDL_FALSE if the lock is already held.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTryLock(SDL_SpinLock *lock);
|
||||
|
||||
/**
|
||||
* \brief Lock a spin lock by setting it to a non-zero value.
|
||||
*
|
||||
* \param lock Points to the lock.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_AtomicLock(SDL_SpinLock *lock);
|
||||
|
||||
/**
|
||||
* \brief Unlock a spin lock by setting it to 0. Always returns immediately
|
||||
*
|
||||
* \param lock Points to the lock.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock);
|
||||
|
||||
/* @} *//* SDL AtomicLock */
|
||||
|
||||
|
||||
/**
|
||||
* The compiler barrier prevents the compiler from reordering
|
||||
* reads and writes to globally visible variables across the call.
|
||||
*/
|
||||
#if defined(_MSC_VER) && (_MSC_VER > 1200)
|
||||
void _ReadWriteBarrier(void);
|
||||
#pragma intrinsic(_ReadWriteBarrier)
|
||||
#define SDL_CompilerBarrier() _ReadWriteBarrier()
|
||||
#elif defined(__GNUC__)
|
||||
#define SDL_CompilerBarrier() __asm__ __volatile__ ("" : : : "memory")
|
||||
#else
|
||||
#define SDL_CompilerBarrier() \
|
||||
{ SDL_SpinLock _tmp = 0; SDL_AtomicLock(&_tmp); SDL_AtomicUnlock(&_tmp); }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Memory barriers are designed to prevent reads and writes from being
|
||||
* reordered by the compiler and being seen out of order on multi-core CPUs.
|
||||
*
|
||||
* A typical pattern would be for thread A to write some data and a flag,
|
||||
* and for thread B to read the flag and get the data. In this case you
|
||||
* would insert a release barrier between writing the data and the flag,
|
||||
* guaranteeing that the data write completes no later than the flag is
|
||||
* written, and you would insert an acquire barrier between reading the
|
||||
* flag and reading the data, to ensure that all the reads associated
|
||||
* with the flag have completed.
|
||||
*
|
||||
* In this pattern you should always see a release barrier paired with
|
||||
* an acquire barrier and you should gate the data reads/writes with a
|
||||
* single flag variable.
|
||||
*
|
||||
* For more information on these semantics, take a look at the blog post:
|
||||
* http://preshing.com/20120913/acquire-and-release-semantics
|
||||
*/
|
||||
#if defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("lwsync" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("lwsync" : : : "memory")
|
||||
#elif defined(__GNUC__) && defined(__arm__)
|
||||
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__)
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__)
|
||||
#ifdef __thumb__
|
||||
/* The mcr instruction isn't available in thumb mode, use real functions */
|
||||
extern DECLSPEC void SDLCALL SDL_MemoryBarrierRelease();
|
||||
extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquire();
|
||||
#else
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
|
||||
#endif /* __thumb__ */
|
||||
#else
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("" : : : "memory")
|
||||
#endif /* __GNUC__ && __arm__ */
|
||||
#else
|
||||
/* This is correct for the x86 and x64 CPUs, and we'll expand this over time. */
|
||||
#define SDL_MemoryBarrierRelease() SDL_CompilerBarrier()
|
||||
#define SDL_MemoryBarrierAcquire() SDL_CompilerBarrier()
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief A type representing an atomic integer value. It is a struct
|
||||
* so people don't accidentally use numeric operations on it.
|
||||
*/
|
||||
typedef struct { int value; } SDL_atomic_t;
|
||||
|
||||
/**
|
||||
* \brief Set an atomic variable to a new value if it is currently an old value.
|
||||
*
|
||||
* \return SDL_TRUE if the atomic variable was set, SDL_FALSE otherwise.
|
||||
*
|
||||
* \note If you don't know what this function is for, you shouldn't use it!
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval);
|
||||
|
||||
/**
|
||||
* \brief Set an atomic variable to a value.
|
||||
*
|
||||
* \return The previous value of the atomic variable.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AtomicSet(SDL_atomic_t *a, int v);
|
||||
|
||||
/**
|
||||
* \brief Get the value of an atomic variable
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AtomicGet(SDL_atomic_t *a);
|
||||
|
||||
/**
|
||||
* \brief Add to an atomic variable.
|
||||
*
|
||||
* \return The previous value of the atomic variable.
|
||||
*
|
||||
* \note This same style can be used for any number operation
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AtomicAdd(SDL_atomic_t *a, int v);
|
||||
|
||||
/**
|
||||
* \brief Increment an atomic variable used as a reference count.
|
||||
*/
|
||||
#ifndef SDL_AtomicIncRef
|
||||
#define SDL_AtomicIncRef(a) SDL_AtomicAdd(a, 1)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Decrement an atomic variable used as a reference count.
|
||||
*
|
||||
* \return SDL_TRUE if the variable reached zero after decrementing,
|
||||
* SDL_FALSE otherwise
|
||||
*/
|
||||
#ifndef SDL_AtomicDecRef
|
||||
#define SDL_AtomicDecRef(a) (SDL_AtomicAdd(a, -1) == 1)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Set a pointer to a new value if it is currently an old value.
|
||||
*
|
||||
* \return SDL_TRUE if the pointer was set, SDL_FALSE otherwise.
|
||||
*
|
||||
* \note If you don't know what this function is for, you shouldn't use it!
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCASPtr(void **a, void *oldval, void *newval);
|
||||
|
||||
/**
|
||||
* \brief Set a pointer to a value atomically.
|
||||
*
|
||||
* \return The previous value of the pointer.
|
||||
*/
|
||||
extern DECLSPEC void* SDLCALL SDL_AtomicSetPtr(void **a, void* v);
|
||||
|
||||
/**
|
||||
* \brief Get the value of a pointer atomically.
|
||||
*/
|
||||
extern DECLSPEC void* SDLCALL SDL_AtomicGetPtr(void **a);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_atomic_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,506 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_audio.h
|
||||
*
|
||||
* Access to the raw audio mixing buffer for the SDL library.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_audio_h
|
||||
#define _SDL_audio_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_endian.h"
|
||||
#include "SDL_mutex.h"
|
||||
#include "SDL_thread.h"
|
||||
#include "SDL_rwops.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Audio format flags.
|
||||
*
|
||||
* These are what the 16 bits in SDL_AudioFormat currently mean...
|
||||
* (Unspecified bits are always zero).
|
||||
*
|
||||
* \verbatim
|
||||
++-----------------------sample is signed if set
|
||||
||
|
||||
|| ++-----------sample is bigendian if set
|
||||
|| ||
|
||||
|| || ++---sample is float if set
|
||||
|| || ||
|
||||
|| || || +---sample bit size---+
|
||||
|| || || | |
|
||||
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
|
||||
\endverbatim
|
||||
*
|
||||
* There are macros in SDL 2.0 and later to query these bits.
|
||||
*/
|
||||
typedef Uint16 SDL_AudioFormat;
|
||||
|
||||
/**
|
||||
* \name Audio flags
|
||||
*/
|
||||
/* @{ */
|
||||
|
||||
#define SDL_AUDIO_MASK_BITSIZE (0xFF)
|
||||
#define SDL_AUDIO_MASK_DATATYPE (1<<8)
|
||||
#define SDL_AUDIO_MASK_ENDIAN (1<<12)
|
||||
#define SDL_AUDIO_MASK_SIGNED (1<<15)
|
||||
#define SDL_AUDIO_BITSIZE(x) (x & SDL_AUDIO_MASK_BITSIZE)
|
||||
#define SDL_AUDIO_ISFLOAT(x) (x & SDL_AUDIO_MASK_DATATYPE)
|
||||
#define SDL_AUDIO_ISBIGENDIAN(x) (x & SDL_AUDIO_MASK_ENDIAN)
|
||||
#define SDL_AUDIO_ISSIGNED(x) (x & SDL_AUDIO_MASK_SIGNED)
|
||||
#define SDL_AUDIO_ISINT(x) (!SDL_AUDIO_ISFLOAT(x))
|
||||
#define SDL_AUDIO_ISLITTLEENDIAN(x) (!SDL_AUDIO_ISBIGENDIAN(x))
|
||||
#define SDL_AUDIO_ISUNSIGNED(x) (!SDL_AUDIO_ISSIGNED(x))
|
||||
|
||||
/**
|
||||
* \name Audio format flags
|
||||
*
|
||||
* Defaults to LSB byte order.
|
||||
*/
|
||||
/* @{ */
|
||||
#define AUDIO_U8 0x0008 /**< Unsigned 8-bit samples */
|
||||
#define AUDIO_S8 0x8008 /**< Signed 8-bit samples */
|
||||
#define AUDIO_U16LSB 0x0010 /**< Unsigned 16-bit samples */
|
||||
#define AUDIO_S16LSB 0x8010 /**< Signed 16-bit samples */
|
||||
#define AUDIO_U16MSB 0x1010 /**< As above, but big-endian byte order */
|
||||
#define AUDIO_S16MSB 0x9010 /**< As above, but big-endian byte order */
|
||||
#define AUDIO_U16 AUDIO_U16LSB
|
||||
#define AUDIO_S16 AUDIO_S16LSB
|
||||
/* @} */
|
||||
|
||||
/**
|
||||
* \name int32 support
|
||||
*/
|
||||
/* @{ */
|
||||
#define AUDIO_S32LSB 0x8020 /**< 32-bit integer samples */
|
||||
#define AUDIO_S32MSB 0x9020 /**< As above, but big-endian byte order */
|
||||
#define AUDIO_S32 AUDIO_S32LSB
|
||||
/* @} */
|
||||
|
||||
/**
|
||||
* \name float32 support
|
||||
*/
|
||||
/* @{ */
|
||||
#define AUDIO_F32LSB 0x8120 /**< 32-bit floating point samples */
|
||||
#define AUDIO_F32MSB 0x9120 /**< As above, but big-endian byte order */
|
||||
#define AUDIO_F32 AUDIO_F32LSB
|
||||
/* @} */
|
||||
|
||||
/**
|
||||
* \name Native audio byte ordering
|
||||
*/
|
||||
/* @{ */
|
||||
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
|
||||
#define AUDIO_U16SYS AUDIO_U16LSB
|
||||
#define AUDIO_S16SYS AUDIO_S16LSB
|
||||
#define AUDIO_S32SYS AUDIO_S32LSB
|
||||
#define AUDIO_F32SYS AUDIO_F32LSB
|
||||
#else
|
||||
#define AUDIO_U16SYS AUDIO_U16MSB
|
||||
#define AUDIO_S16SYS AUDIO_S16MSB
|
||||
#define AUDIO_S32SYS AUDIO_S32MSB
|
||||
#define AUDIO_F32SYS AUDIO_F32MSB
|
||||
#endif
|
||||
/* @} */
|
||||
|
||||
/**
|
||||
* \name Allow change flags
|
||||
*
|
||||
* Which audio format changes are allowed when opening a device.
|
||||
*/
|
||||
/* @{ */
|
||||
#define SDL_AUDIO_ALLOW_FREQUENCY_CHANGE 0x00000001
|
||||
#define SDL_AUDIO_ALLOW_FORMAT_CHANGE 0x00000002
|
||||
#define SDL_AUDIO_ALLOW_CHANNELS_CHANGE 0x00000004
|
||||
#define SDL_AUDIO_ALLOW_ANY_CHANGE (SDL_AUDIO_ALLOW_FREQUENCY_CHANGE|SDL_AUDIO_ALLOW_FORMAT_CHANGE|SDL_AUDIO_ALLOW_CHANNELS_CHANGE)
|
||||
/* @} */
|
||||
|
||||
/* @} *//* Audio flags */
|
||||
|
||||
/**
|
||||
* This function is called when the audio device needs more data.
|
||||
*
|
||||
* \param userdata An application-specific parameter saved in
|
||||
* the SDL_AudioSpec structure
|
||||
* \param stream A pointer to the audio data buffer.
|
||||
* \param len The length of that buffer in bytes.
|
||||
*
|
||||
* Once the callback returns, the buffer will no longer be valid.
|
||||
* Stereo samples are stored in a LRLRLR ordering.
|
||||
*/
|
||||
typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream,
|
||||
int len);
|
||||
|
||||
/**
|
||||
* The calculated values in this structure are calculated by SDL_OpenAudio().
|
||||
*/
|
||||
typedef struct SDL_AudioSpec
|
||||
{
|
||||
int freq; /**< DSP frequency -- samples per second */
|
||||
SDL_AudioFormat format; /**< Audio data format */
|
||||
Uint8 channels; /**< Number of channels: 1 mono, 2 stereo */
|
||||
Uint8 silence; /**< Audio buffer silence value (calculated) */
|
||||
Uint16 samples; /**< Audio buffer size in samples (power of 2) */
|
||||
Uint16 padding; /**< Necessary for some compile environments */
|
||||
Uint32 size; /**< Audio buffer size in bytes (calculated) */
|
||||
SDL_AudioCallback callback;
|
||||
void *userdata;
|
||||
} SDL_AudioSpec;
|
||||
|
||||
|
||||
struct SDL_AudioCVT;
|
||||
typedef void (SDLCALL * SDL_AudioFilter) (struct SDL_AudioCVT * cvt,
|
||||
SDL_AudioFormat format);
|
||||
|
||||
/**
|
||||
* A structure to hold a set of audio conversion filters and buffers.
|
||||
*/
|
||||
#ifdef __GNUC__
|
||||
/* This structure is 84 bytes on 32-bit architectures, make sure GCC doesn't
|
||||
pad it out to 88 bytes to guarantee ABI compatibility between compilers.
|
||||
vvv
|
||||
The next time we rev the ABI, make sure to size the ints and add padding.
|
||||
*/
|
||||
#define SDL_AUDIOCVT_PACKED __attribute__((packed))
|
||||
#else
|
||||
#define SDL_AUDIOCVT_PACKED
|
||||
#endif
|
||||
/* */
|
||||
typedef struct SDL_AudioCVT
|
||||
{
|
||||
int needed; /**< Set to 1 if conversion possible */
|
||||
SDL_AudioFormat src_format; /**< Source audio format */
|
||||
SDL_AudioFormat dst_format; /**< Target audio format */
|
||||
double rate_incr; /**< Rate conversion increment */
|
||||
Uint8 *buf; /**< Buffer to hold entire audio data */
|
||||
int len; /**< Length of original audio buffer */
|
||||
int len_cvt; /**< Length of converted audio buffer */
|
||||
int len_mult; /**< buffer must be len*len_mult big */
|
||||
double len_ratio; /**< Given len, final size is len*len_ratio */
|
||||
SDL_AudioFilter filters[10]; /**< Filter list */
|
||||
int filter_index; /**< Current audio conversion function */
|
||||
} SDL_AUDIOCVT_PACKED SDL_AudioCVT;
|
||||
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/**
|
||||
* \name Driver discovery functions
|
||||
*
|
||||
* These functions return the list of built in audio drivers, in the
|
||||
* order that they are normally initialized by default.
|
||||
*/
|
||||
/* @{ */
|
||||
extern DECLSPEC int SDLCALL SDL_GetNumAudioDrivers(void);
|
||||
extern DECLSPEC const char *SDLCALL SDL_GetAudioDriver(int index);
|
||||
/* @} */
|
||||
|
||||
/**
|
||||
* \name Initialization and cleanup
|
||||
*
|
||||
* \internal These functions are used internally, and should not be used unless
|
||||
* you have a specific need to specify the audio driver you want to
|
||||
* use. You should normally use SDL_Init() or SDL_InitSubSystem().
|
||||
*/
|
||||
/* @{ */
|
||||
extern DECLSPEC int SDLCALL SDL_AudioInit(const char *driver_name);
|
||||
extern DECLSPEC void SDLCALL SDL_AudioQuit(void);
|
||||
/* @} */
|
||||
|
||||
/**
|
||||
* This function returns the name of the current audio driver, or NULL
|
||||
* if no driver has been initialized.
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GetCurrentAudioDriver(void);
|
||||
|
||||
/**
|
||||
* This function opens the audio device with the desired parameters, and
|
||||
* returns 0 if successful, placing the actual hardware parameters in the
|
||||
* structure pointed to by \c obtained. If \c obtained is NULL, the audio
|
||||
* data passed to the callback function will be guaranteed to be in the
|
||||
* requested format, and will be automatically converted to the hardware
|
||||
* audio format if necessary. This function returns -1 if it failed
|
||||
* to open the audio device, or couldn't set up the audio thread.
|
||||
*
|
||||
* When filling in the desired audio spec structure,
|
||||
* - \c desired->freq should be the desired audio frequency in samples-per-
|
||||
* second.
|
||||
* - \c desired->format should be the desired audio format.
|
||||
* - \c desired->samples is the desired size of the audio buffer, in
|
||||
* samples. This number should be a power of two, and may be adjusted by
|
||||
* the audio driver to a value more suitable for the hardware. Good values
|
||||
* seem to range between 512 and 8096 inclusive, depending on the
|
||||
* application and CPU speed. Smaller values yield faster response time,
|
||||
* but can lead to underflow if the application is doing heavy processing
|
||||
* and cannot fill the audio buffer in time. A stereo sample consists of
|
||||
* both right and left channels in LR ordering.
|
||||
* Note that the number of samples is directly related to time by the
|
||||
* following formula: \code ms = (samples*1000)/freq \endcode
|
||||
* - \c desired->size is the size in bytes of the audio buffer, and is
|
||||
* calculated by SDL_OpenAudio().
|
||||
* - \c desired->silence is the value used to set the buffer to silence,
|
||||
* and is calculated by SDL_OpenAudio().
|
||||
* - \c desired->callback should be set to a function that will be called
|
||||
* when the audio device is ready for more data. It is passed a pointer
|
||||
* to the audio buffer, and the length in bytes of the audio buffer.
|
||||
* This function usually runs in a separate thread, and so you should
|
||||
* protect data structures that it accesses by calling SDL_LockAudio()
|
||||
* and SDL_UnlockAudio() in your code.
|
||||
* - \c desired->userdata is passed as the first parameter to your callback
|
||||
* function.
|
||||
*
|
||||
* The audio device starts out playing silence when it's opened, and should
|
||||
* be enabled for playing by calling \c SDL_PauseAudio(0) when you are ready
|
||||
* for your audio callback function to be called. Since the audio driver
|
||||
* may modify the requested size of the audio buffer, you should allocate
|
||||
* any local mixing buffers after you open the audio device.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_OpenAudio(SDL_AudioSpec * desired,
|
||||
SDL_AudioSpec * obtained);
|
||||
|
||||
/**
|
||||
* SDL Audio Device IDs.
|
||||
*
|
||||
* A successful call to SDL_OpenAudio() is always device id 1, and legacy
|
||||
* SDL audio APIs assume you want this device ID. SDL_OpenAudioDevice() calls
|
||||
* always returns devices >= 2 on success. The legacy calls are good both
|
||||
* for backwards compatibility and when you don't care about multiple,
|
||||
* specific, or capture devices.
|
||||
*/
|
||||
typedef Uint32 SDL_AudioDeviceID;
|
||||
|
||||
/**
|
||||
* Get the number of available devices exposed by the current driver.
|
||||
* Only valid after a successfully initializing the audio subsystem.
|
||||
* Returns -1 if an explicit list of devices can't be determined; this is
|
||||
* not an error. For example, if SDL is set up to talk to a remote audio
|
||||
* server, it can't list every one available on the Internet, but it will
|
||||
* still allow a specific host to be specified to SDL_OpenAudioDevice().
|
||||
*
|
||||
* In many common cases, when this function returns a value <= 0, it can still
|
||||
* successfully open the default device (NULL for first argument of
|
||||
* SDL_OpenAudioDevice()).
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetNumAudioDevices(int iscapture);
|
||||
|
||||
/**
|
||||
* Get the human-readable name of a specific audio device.
|
||||
* Must be a value between 0 and (number of audio devices-1).
|
||||
* Only valid after a successfully initializing the audio subsystem.
|
||||
* The values returned by this function reflect the latest call to
|
||||
* SDL_GetNumAudioDevices(); recall that function to redetect available
|
||||
* hardware.
|
||||
*
|
||||
* The string returned by this function is UTF-8 encoded, read-only, and
|
||||
* managed internally. You are not to free it. If you need to keep the
|
||||
* string for any length of time, you should make your own copy of it, as it
|
||||
* will be invalid next time any of several other SDL functions is called.
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GetAudioDeviceName(int index,
|
||||
int iscapture);
|
||||
|
||||
|
||||
/**
|
||||
* Open a specific audio device. Passing in a device name of NULL requests
|
||||
* the most reasonable default (and is equivalent to calling SDL_OpenAudio()).
|
||||
*
|
||||
* The device name is a UTF-8 string reported by SDL_GetAudioDeviceName(), but
|
||||
* some drivers allow arbitrary and driver-specific strings, such as a
|
||||
* hostname/IP address for a remote audio server, or a filename in the
|
||||
* diskaudio driver.
|
||||
*
|
||||
* \return 0 on error, a valid device ID that is >= 2 on success.
|
||||
*
|
||||
* SDL_OpenAudio(), unlike this function, always acts on device ID 1.
|
||||
*/
|
||||
extern DECLSPEC SDL_AudioDeviceID SDLCALL SDL_OpenAudioDevice(const char
|
||||
*device,
|
||||
int iscapture,
|
||||
const
|
||||
SDL_AudioSpec *
|
||||
desired,
|
||||
SDL_AudioSpec *
|
||||
obtained,
|
||||
int
|
||||
allowed_changes);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \name Audio state
|
||||
*
|
||||
* Get the current audio state.
|
||||
*/
|
||||
/* @{ */
|
||||
typedef enum
|
||||
{
|
||||
SDL_AUDIO_STOPPED = 0,
|
||||
SDL_AUDIO_PLAYING,
|
||||
SDL_AUDIO_PAUSED
|
||||
} SDL_AudioStatus;
|
||||
extern DECLSPEC SDL_AudioStatus SDLCALL SDL_GetAudioStatus(void);
|
||||
|
||||
extern DECLSPEC SDL_AudioStatus SDLCALL
|
||||
SDL_GetAudioDeviceStatus(SDL_AudioDeviceID dev);
|
||||
/* @} *//* Audio State */
|
||||
|
||||
/**
|
||||
* \name Pause audio functions
|
||||
*
|
||||
* These functions pause and unpause the audio callback processing.
|
||||
* They should be called with a parameter of 0 after opening the audio
|
||||
* device to start playing sound. This is so you can safely initialize
|
||||
* data for your callback function after opening the audio device.
|
||||
* Silence will be written to the audio device during the pause.
|
||||
*/
|
||||
/* @{ */
|
||||
extern DECLSPEC void SDLCALL SDL_PauseAudio(int pause_on);
|
||||
extern DECLSPEC void SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev,
|
||||
int pause_on);
|
||||
/* @} *//* Pause audio functions */
|
||||
|
||||
/**
|
||||
* This function loads a WAVE from the data source, automatically freeing
|
||||
* that source if \c freesrc is non-zero. For example, to load a WAVE file,
|
||||
* you could do:
|
||||
* \code
|
||||
* SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", "rb"), 1, ...);
|
||||
* \endcode
|
||||
*
|
||||
* If this function succeeds, it returns the given SDL_AudioSpec,
|
||||
* filled with the audio data format of the wave data, and sets
|
||||
* \c *audio_buf to a malloc()'d buffer containing the audio data,
|
||||
* and sets \c *audio_len to the length of that audio buffer, in bytes.
|
||||
* You need to free the audio buffer with SDL_FreeWAV() when you are
|
||||
* done with it.
|
||||
*
|
||||
* This function returns NULL and sets the SDL error message if the
|
||||
* wave file cannot be opened, uses an unknown data format, or is
|
||||
* corrupt. Currently raw and MS-ADPCM WAVE files are supported.
|
||||
*/
|
||||
extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src,
|
||||
int freesrc,
|
||||
SDL_AudioSpec * spec,
|
||||
Uint8 ** audio_buf,
|
||||
Uint32 * audio_len);
|
||||
|
||||
/**
|
||||
* Loads a WAV from a file.
|
||||
* Compatibility convenience function.
|
||||
*/
|
||||
#define SDL_LoadWAV(file, spec, audio_buf, audio_len) \
|
||||
SDL_LoadWAV_RW(SDL_RWFromFile(file, "rb"),1, spec,audio_buf,audio_len)
|
||||
|
||||
/**
|
||||
* This function frees data previously allocated with SDL_LoadWAV_RW()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_FreeWAV(Uint8 * audio_buf);
|
||||
|
||||
/**
|
||||
* This function takes a source format and rate and a destination format
|
||||
* and rate, and initializes the \c cvt structure with information needed
|
||||
* by SDL_ConvertAudio() to convert a buffer of audio data from one format
|
||||
* to the other.
|
||||
*
|
||||
* \return -1 if the format conversion is not supported, 0 if there's
|
||||
* no conversion needed, or 1 if the audio filter is set up.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT * cvt,
|
||||
SDL_AudioFormat src_format,
|
||||
Uint8 src_channels,
|
||||
int src_rate,
|
||||
SDL_AudioFormat dst_format,
|
||||
Uint8 dst_channels,
|
||||
int dst_rate);
|
||||
|
||||
/**
|
||||
* Once you have initialized the \c cvt structure using SDL_BuildAudioCVT(),
|
||||
* created an audio buffer \c cvt->buf, and filled it with \c cvt->len bytes of
|
||||
* audio data in the source format, this function will convert it in-place
|
||||
* to the desired format.
|
||||
*
|
||||
* The data conversion may expand the size of the audio data, so the buffer
|
||||
* \c cvt->buf should be allocated after the \c cvt structure is initialized by
|
||||
* SDL_BuildAudioCVT(), and should be \c cvt->len*cvt->len_mult bytes long.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_ConvertAudio(SDL_AudioCVT * cvt);
|
||||
|
||||
#define SDL_MIX_MAXVOLUME 128
|
||||
/**
|
||||
* This takes two audio buffers of the playing audio format and mixes
|
||||
* them, performing addition, volume adjustment, and overflow clipping.
|
||||
* The volume ranges from 0 - 128, and should be set to ::SDL_MIX_MAXVOLUME
|
||||
* for full audio volume. Note this does not change hardware volume.
|
||||
* This is provided for convenience -- you can mix your own audio data.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_MixAudio(Uint8 * dst, const Uint8 * src,
|
||||
Uint32 len, int volume);
|
||||
|
||||
/**
|
||||
* This works like SDL_MixAudio(), but you specify the audio format instead of
|
||||
* using the format of audio device 1. Thus it can be used when no audio
|
||||
* device is open at all.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
|
||||
const Uint8 * src,
|
||||
SDL_AudioFormat format,
|
||||
Uint32 len, int volume);
|
||||
|
||||
/**
|
||||
* \name Audio lock functions
|
||||
*
|
||||
* The lock manipulated by these functions protects the callback function.
|
||||
* During a SDL_LockAudio()/SDL_UnlockAudio() pair, you can be guaranteed that
|
||||
* the callback function is not running. Do not call these from the callback
|
||||
* function or you will cause deadlock.
|
||||
*/
|
||||
/* @{ */
|
||||
extern DECLSPEC void SDLCALL SDL_LockAudio(void);
|
||||
extern DECLSPEC void SDLCALL SDL_LockAudioDevice(SDL_AudioDeviceID dev);
|
||||
extern DECLSPEC void SDLCALL SDL_UnlockAudio(void);
|
||||
extern DECLSPEC void SDLCALL SDL_UnlockAudioDevice(SDL_AudioDeviceID dev);
|
||||
/* @} *//* Audio lock functions */
|
||||
|
||||
/**
|
||||
* This function shuts down audio processing and closes the audio device.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_CloseAudio(void);
|
||||
extern DECLSPEC void SDLCALL SDL_CloseAudioDevice(SDL_AudioDeviceID dev);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_audio_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,97 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_bits.h
|
||||
*
|
||||
* Functions for fiddling with bits and bitmasks.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_bits_h
|
||||
#define _SDL_bits_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \file SDL_bits.h
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get the index of the most significant bit. Result is undefined when called
|
||||
* with 0. This operation can also be stated as "count leading zeroes" and
|
||||
* "log base 2".
|
||||
*
|
||||
* \return Index of the most significant bit, or -1 if the value is 0.
|
||||
*/
|
||||
SDL_FORCE_INLINE int
|
||||
SDL_MostSignificantBitIndex32(Uint32 x)
|
||||
{
|
||||
#if defined(__GNUC__) && __GNUC__ >= 4
|
||||
/* Count Leading Zeroes builtin in GCC.
|
||||
* http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/Other-Builtins.html
|
||||
*/
|
||||
if (x == 0) {
|
||||
return -1;
|
||||
}
|
||||
return 31 - __builtin_clz(x);
|
||||
#else
|
||||
/* Based off of Bit Twiddling Hacks by Sean Eron Anderson
|
||||
* <seander@cs.stanford.edu>, released in the public domain.
|
||||
* http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog
|
||||
*/
|
||||
const Uint32 b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000};
|
||||
const int S[] = {1, 2, 4, 8, 16};
|
||||
|
||||
int msbIndex = 0;
|
||||
int i;
|
||||
|
||||
if (x == 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (i = 4; i >= 0; i--)
|
||||
{
|
||||
if (x & b[i])
|
||||
{
|
||||
x >>= S[i];
|
||||
msbIndex |= S[i];
|
||||
}
|
||||
}
|
||||
|
||||
return msbIndex;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_bits_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_blendmode.h
|
||||
*
|
||||
* Header file declaring the SDL_BlendMode enumeration
|
||||
*/
|
||||
|
||||
#ifndef _SDL_blendmode_h
|
||||
#define _SDL_blendmode_h
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief The blend mode used in SDL_RenderCopy() and drawing operations.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_BLENDMODE_NONE = 0x00000000, /**< no blending
|
||||
dstRGBA = srcRGBA */
|
||||
SDL_BLENDMODE_BLEND = 0x00000001, /**< alpha blending
|
||||
dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA))
|
||||
dstA = srcA + (dstA * (1-srcA)) */
|
||||
SDL_BLENDMODE_ADD = 0x00000002, /**< additive blending
|
||||
dstRGB = (srcRGB * srcA) + dstRGB
|
||||
dstA = dstA */
|
||||
SDL_BLENDMODE_MOD = 0x00000004 /**< color modulate
|
||||
dstRGB = srcRGB * dstRGB
|
||||
dstA = dstA */
|
||||
} SDL_BlendMode;
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_video_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_clipboard.h
|
||||
*
|
||||
* Include file for SDL clipboard handling
|
||||
*/
|
||||
|
||||
#ifndef _SDL_clipboard_h
|
||||
#define _SDL_clipboard_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/**
|
||||
* \brief Put UTF-8 text into the clipboard
|
||||
*
|
||||
* \sa SDL_GetClipboardText()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text);
|
||||
|
||||
/**
|
||||
* \brief Get UTF-8 text from the clipboard, which must be freed with SDL_free()
|
||||
*
|
||||
* \sa SDL_SetClipboardText()
|
||||
*/
|
||||
extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void);
|
||||
|
||||
/**
|
||||
* \brief Returns a flag indicating whether the clipboard exists and contains a text string that is non-empty
|
||||
*
|
||||
* \sa SDL_GetClipboardText()
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void);
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_clipboard_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_config_h
|
||||
#define _SDL_config_h
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/**
|
||||
* \file SDL_config.h
|
||||
*/
|
||||
|
||||
/* Add any platform that doesn't build using the configure system. */
|
||||
#ifdef USING_PREMAKE_CONFIG_H
|
||||
#include "SDL_config_premake.h"
|
||||
#elif defined(__WIN32__)
|
||||
#include "SDL_config_windows.h"
|
||||
#elif defined(__WINRT__)
|
||||
#include "SDL_config_winrt.h"
|
||||
#elif defined(__MACOSX__)
|
||||
#include "SDL_config_macosx.h"
|
||||
#elif defined(__IPHONEOS__)
|
||||
#include "SDL_config_iphoneos.h"
|
||||
#elif defined(__ANDROID__)
|
||||
#include "SDL_config_android.h"
|
||||
#elif defined(__PSP__)
|
||||
#include "SDL_config_psp.h"
|
||||
#else
|
||||
/* This is a minimal configuration just to get SDL running on new platforms */
|
||||
#include "SDL_config_minimal.h"
|
||||
#endif /* platform config */
|
||||
|
||||
#ifdef USING_GENERATED_CONFIG_H
|
||||
#error Wrong SDL_config.h, check your include path?
|
||||
#endif
|
||||
|
||||
#endif /* _SDL_config_h */
|
|
@ -0,0 +1,395 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_config_h
|
||||
#define _SDL_config_h
|
||||
|
||||
/**
|
||||
* \file SDL_config.h.in
|
||||
*
|
||||
* This is a set of defines to configure the SDL features
|
||||
*/
|
||||
|
||||
/* General platform specific identifiers */
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/* C language features */
|
||||
#cmakedefine const @HAVE_CONST@
|
||||
#cmakedefine inline @HAVE_INLINE@
|
||||
#cmakedefine volatile @HAVE_VOLATILE@
|
||||
|
||||
/* C datatypes */
|
||||
/* Define SIZEOF_VOIDP for 64/32 architectures */
|
||||
#ifdef __LP64__
|
||||
#define SIZEOF_VOIDP 8
|
||||
#else
|
||||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
#cmakedefine HAVE_GCC_ATOMICS @HAVE_GCC_ATOMICS@
|
||||
#cmakedefine HAVE_GCC_SYNC_LOCK_TEST_AND_SET @HAVE_GCC_SYNC_LOCK_TEST_AND_SET@
|
||||
#cmakedefine HAVE_PTHREAD_SPINLOCK @HAVE_PTHREAD_SPINLOCK@
|
||||
|
||||
/* Comment this if you want to build without any C library requirements */
|
||||
#cmakedefine HAVE_LIBC 1
|
||||
#if HAVE_LIBC
|
||||
|
||||
/* Useful headers */
|
||||
#cmakedefine HAVE_ALLOCA_H 1
|
||||
#cmakedefine HAVE_SYS_TYPES_H 1
|
||||
#cmakedefine HAVE_STDIO_H 1
|
||||
#cmakedefine STDC_HEADERS 1
|
||||
#cmakedefine HAVE_STDLIB_H 1
|
||||
#cmakedefine HAVE_STDARG_H 1
|
||||
#cmakedefine HAVE_MALLOC_H 1
|
||||
#cmakedefine HAVE_MEMORY_H 1
|
||||
#cmakedefine HAVE_STRING_H 1
|
||||
#cmakedefine HAVE_STRINGS_H 1
|
||||
#cmakedefine HAVE_INTTYPES_H 1
|
||||
#cmakedefine HAVE_STDINT_H 1
|
||||
#cmakedefine HAVE_CTYPE_H 1
|
||||
#cmakedefine HAVE_MATH_H 1
|
||||
#cmakedefine HAVE_ICONV_H 1
|
||||
#cmakedefine HAVE_SIGNAL_H 1
|
||||
#cmakedefine HAVE_ALTIVEC_H 1
|
||||
#cmakedefine HAVE_PTHREAD_NP_H 1
|
||||
#cmakedefine HAVE_LIBUDEV_H 1
|
||||
#cmakedefine HAVE_DBUS_DBUS_H 1
|
||||
|
||||
/* C library functions */
|
||||
#cmakedefine HAVE_MALLOC 1
|
||||
#cmakedefine HAVE_CALLOC 1
|
||||
#cmakedefine HAVE_REALLOC 1
|
||||
#cmakedefine HAVE_FREE 1
|
||||
#cmakedefine HAVE_ALLOCA 1
|
||||
#ifndef __WIN32__ /* Don't use C runtime versions of these on Windows */
|
||||
#cmakedefine HAVE_GETENV 1
|
||||
#cmakedefine HAVE_SETENV 1
|
||||
#cmakedefine HAVE_PUTENV 1
|
||||
#cmakedefine HAVE_UNSETENV 1
|
||||
#endif
|
||||
#cmakedefine HAVE_QSORT 1
|
||||
#cmakedefine HAVE_ABS 1
|
||||
#cmakedefine HAVE_BCOPY 1
|
||||
#cmakedefine HAVE_MEMSET 1
|
||||
#cmakedefine HAVE_MEMCPY 1
|
||||
#cmakedefine HAVE_MEMMOVE 1
|
||||
#cmakedefine HAVE_MEMCMP 1
|
||||
#cmakedefine HAVE_STRLEN 1
|
||||
#cmakedefine HAVE_STRLCPY 1
|
||||
#cmakedefine HAVE_STRLCAT 1
|
||||
#cmakedefine HAVE_STRDUP 1
|
||||
#cmakedefine HAVE__STRREV 1
|
||||
#cmakedefine HAVE__STRUPR 1
|
||||
#cmakedefine HAVE__STRLWR 1
|
||||
#cmakedefine HAVE_INDEX 1
|
||||
#cmakedefine HAVE_RINDEX 1
|
||||
#cmakedefine HAVE_STRCHR 1
|
||||
#cmakedefine HAVE_STRRCHR 1
|
||||
#cmakedefine HAVE_STRSTR 1
|
||||
#cmakedefine HAVE_ITOA 1
|
||||
#cmakedefine HAVE__LTOA 1
|
||||
#cmakedefine HAVE__UITOA 1
|
||||
#cmakedefine HAVE__ULTOA 1
|
||||
#cmakedefine HAVE_STRTOL 1
|
||||
#cmakedefine HAVE_STRTOUL 1
|
||||
#cmakedefine HAVE__I64TOA 1
|
||||
#cmakedefine HAVE__UI64TOA 1
|
||||
#cmakedefine HAVE_STRTOLL 1
|
||||
#cmakedefine HAVE_STRTOULL 1
|
||||
#cmakedefine HAVE_STRTOD 1
|
||||
#cmakedefine HAVE_ATOI 1
|
||||
#cmakedefine HAVE_ATOF 1
|
||||
#cmakedefine HAVE_STRCMP 1
|
||||
#cmakedefine HAVE_STRNCMP 1
|
||||
#cmakedefine HAVE__STRICMP 1
|
||||
#cmakedefine HAVE_STRCASECMP 1
|
||||
#cmakedefine HAVE__STRNICMP 1
|
||||
#cmakedefine HAVE_STRNCASECMP 1
|
||||
#cmakedefine HAVE_VSSCANF 1
|
||||
#cmakedefine HAVE_VSNPRINTF 1
|
||||
#cmakedefine HAVE_M_PI 1
|
||||
#cmakedefine HAVE_ATAN 1
|
||||
#cmakedefine HAVE_ATAN2 1
|
||||
#cmakedefine HAVE_ACOS 1
|
||||
#cmakedefine HAVE_ASIN 1
|
||||
#cmakedefine HAVE_CEIL 1
|
||||
#cmakedefine HAVE_COPYSIGN 1
|
||||
#cmakedefine HAVE_COS 1
|
||||
#cmakedefine HAVE_COSF 1
|
||||
#cmakedefine HAVE_FABS 1
|
||||
#cmakedefine HAVE_FLOOR 1
|
||||
#cmakedefine HAVE_LOG 1
|
||||
#cmakedefine HAVE_POW 1
|
||||
#cmakedefine HAVE_SCALBN 1
|
||||
#cmakedefine HAVE_SIN 1
|
||||
#cmakedefine HAVE_SINF 1
|
||||
#cmakedefine HAVE_SQRT 1
|
||||
#cmakedefine HAVE_FSEEKO 1
|
||||
#cmakedefine HAVE_FSEEKO64 1
|
||||
#cmakedefine HAVE_SIGACTION 1
|
||||
#cmakedefine HAVE_SA_SIGACTION 1
|
||||
#cmakedefine HAVE_SETJMP 1
|
||||
#cmakedefine HAVE_NANOSLEEP 1
|
||||
#cmakedefine HAVE_SYSCONF 1
|
||||
#cmakedefine HAVE_SYSCTLBYNAME 1
|
||||
#cmakedefine HAVE_CLOCK_GETTIME 1
|
||||
#cmakedefine HAVE_GETPAGESIZE 1
|
||||
#cmakedefine HAVE_MPROTECT 1
|
||||
#cmakedefine HAVE_ICONV 1
|
||||
#cmakedefine HAVE_PTHREAD_SETNAME_NP 1
|
||||
#cmakedefine HAVE_PTHREAD_SET_NAME_NP 1
|
||||
#cmakedefine HAVE_SEM_TIMEDWAIT 1
|
||||
#elif __WIN32__
|
||||
#cmakedefine HAVE_STDARG_H 1
|
||||
#cmakedefine HAVE_STDDEF_H 1
|
||||
#else
|
||||
/* We may need some replacement for stdarg.h here */
|
||||
#include <stdarg.h>
|
||||
#endif /* HAVE_LIBC */
|
||||
|
||||
/* SDL internal assertion support */
|
||||
#cmakedefine SDL_DEFAULT_ASSERT_LEVEL @SDL_DEFAULT_ASSERT_LEVEL@
|
||||
|
||||
/* Allow disabling of core subsystems */
|
||||
#cmakedefine SDL_ATOMIC_DISABLED @SDL_ATOMIC_DISABLED@
|
||||
#cmakedefine SDL_AUDIO_DISABLED @SDL_AUDIO_DISABLED@
|
||||
#cmakedefine SDL_CPUINFO_DISABLED @SDL_CPUINFO_DISABLED@
|
||||
#cmakedefine SDL_EVENTS_DISABLED @SDL_EVENTS_DISABLED@
|
||||
#cmakedefine SDL_FILE_DISABLED @SDL_FILE_DISABLED@
|
||||
#cmakedefine SDL_JOYSTICK_DISABLED @SDL_JOYSTICK_DISABLED@
|
||||
#cmakedefine SDL_HAPTIC_DISABLED @SDL_HAPTIC_DISABLED@
|
||||
#cmakedefine SDL_LOADSO_DISABLED @SDL_LOADSO_DISABLED@
|
||||
#cmakedefine SDL_RENDER_DISABLED @SDL_RENDER_DISABLED@
|
||||
#cmakedefine SDL_THREADS_DISABLED @SDL_THREADS_DISABLED@
|
||||
#cmakedefine SDL_TIMERS_DISABLED @SDL_TIMERS_DISABLED@
|
||||
#cmakedefine SDL_VIDEO_DISABLED @SDL_VIDEO_DISABLED@
|
||||
#cmakedefine SDL_POWER_DISABLED @SDL_POWER_DISABLED@
|
||||
#cmakedefine SDL_FILESYSTEM_DISABLED @SDL_FILESYSTEM_DISABLED@
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ALSA @SDL_AUDIO_DRIVER_ALSA@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ALSA_DYNAMIC @SDL_AUDIO_DRIVER_ALSA_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ARTS @SDL_AUDIO_DRIVER_ARTS@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ARTS_DYNAMIC @SDL_AUDIO_DRIVER_ARTS_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_PULSEAUDIO @SDL_AUDIO_DRIVER_PULSEAUDIO@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC @SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_HAIKU @SDL_AUDIO_DRIVER_HAIKU@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_BSD @SDL_AUDIO_DRIVER_BSD@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_COREAUDIO @SDL_AUDIO_DRIVER_COREAUDIO@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_DISK @SDL_AUDIO_DRIVER_DISK@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_DUMMY @SDL_AUDIO_DRIVER_DUMMY@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_XAUDIO2 @SDL_AUDIO_DRIVER_XAUDIO2@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_DSOUND @SDL_AUDIO_DRIVER_DSOUND@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ESD @SDL_AUDIO_DRIVER_ESD@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ESD_DYNAMIC @SDL_AUDIO_DRIVER_ESD_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_NAS @SDL_AUDIO_DRIVER_NAS@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_NAS_DYNAMIC @SDL_AUDIO_DRIVER_NAS_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_SNDIO @SDL_AUDIO_DRIVER_SNDIO@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_SNDIO_DYNAMIC @SDL_AUDIO_DRIVER_SNDIO_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_OSS @SDL_AUDIO_DRIVER_OSS@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H @SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_PAUDIO @SDL_AUDIO_DRIVER_PAUDIO@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_QSA @SDL_AUDIO_DRIVER_QSA@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_SUNAUDIO @SDL_AUDIO_DRIVER_SUNAUDIO@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_WINMM @SDL_AUDIO_DRIVER_WINMM@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_FUSIONSOUND @SDL_AUDIO_DRIVER_FUSIONSOUND@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC @SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC@
|
||||
|
||||
/* Enable various input drivers */
|
||||
#cmakedefine SDL_INPUT_LINUXEV @SDL_INPUT_LINUXEV@
|
||||
#cmakedefine SDL_INPUT_LINUXKD @SDL_INPUT_LINUXKD@
|
||||
#cmakedefine SDL_INPUT_TSLIB @SDL_INPUT_TSLIB@
|
||||
#cmakedefine SDL_JOYSTICK_HAIKU @SDL_JOYSTICK_HAIKU@
|
||||
#cmakedefine SDL_JOYSTICK_DINPUT @SDL_JOYSTICK_DINPUT@
|
||||
#cmakedefine SDL_JOYSTICK_DUMMY @SDL_JOYSTICK_DUMMY@
|
||||
#cmakedefine SDL_JOYSTICK_IOKIT @SDL_JOYSTICK_IOKIT@
|
||||
#cmakedefine SDL_JOYSTICK_LINUX @SDL_JOYSTICK_LINUX@
|
||||
#cmakedefine SDL_JOYSTICK_WINMM @SDL_JOYSTICK_WINMM@
|
||||
#cmakedefine SDL_JOYSTICK_USBHID @SDL_JOYSTICK_USBHID@
|
||||
#cmakedefine SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H @SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H@
|
||||
#cmakedefine SDL_HAPTIC_DUMMY @SDL_HAPTIC_DUMMY@
|
||||
#cmakedefine SDL_HAPTIC_LINUX @SDL_HAPTIC_LINUX@
|
||||
#cmakedefine SDL_HAPTIC_IOKIT @SDL_HAPTIC_IOKIT@
|
||||
#cmakedefine SDL_HAPTIC_DINPUT @SDL_HAPTIC_DINPUT@
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#cmakedefine SDL_LOADSO_HAIKU @SDL_LOADSO_HAIKU@
|
||||
#cmakedefine SDL_LOADSO_DLOPEN @SDL_LOADSO_DLOPEN@
|
||||
#cmakedefine SDL_LOADSO_DUMMY @SDL_LOADSO_DUMMY@
|
||||
#cmakedefine SDL_LOADSO_LDG @SDL_LOADSO_LDG@
|
||||
#cmakedefine SDL_LOADSO_WINDOWS @SDL_LOADSO_WINDOWS@
|
||||
|
||||
/* Enable various threading systems */
|
||||
#cmakedefine SDL_THREAD_PTHREAD @SDL_THREAD_PTHREAD@
|
||||
#cmakedefine SDL_THREAD_PTHREAD_RECURSIVE_MUTEX @SDL_THREAD_PTHREAD_RECURSIVE_MUTEX@
|
||||
#cmakedefine SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP @SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP@
|
||||
#cmakedefine SDL_THREAD_WINDOWS @SDL_THREAD_WINDOWS@
|
||||
|
||||
/* Enable various timer systems */
|
||||
#cmakedefine SDL_TIMER_HAIKU @SDL_TIMER_HAIKU@
|
||||
#cmakedefine SDL_TIMER_DUMMY @SDL_TIMER_DUMMY@
|
||||
#cmakedefine SDL_TIMER_UNIX @SDL_TIMER_UNIX@
|
||||
#cmakedefine SDL_TIMER_WINDOWS @SDL_TIMER_WINDOWS@
|
||||
#cmakedefine SDL_TIMER_WINCE @SDL_TIMER_WINCE@
|
||||
|
||||
/* Enable various video drivers */
|
||||
#cmakedefine SDL_VIDEO_DRIVER_HAIKU @SDL_VIDEO_DRIVER_HAIKU@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_COCOA @SDL_VIDEO_DRIVER_COCOA@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_DIRECTFB @SDL_VIDEO_DRIVER_DIRECTFB@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC @SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_DUMMY @SDL_VIDEO_DRIVER_DUMMY@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WINDOWS @SDL_VIDEO_DRIVER_WINDOWS@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND @SDL_VIDEO_DRIVER_WAYLAND@
|
||||
|
||||
#if 0
|
||||
/* !!! FIXME: in configure script version, missing here: */
|
||||
#undef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH
|
||||
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC
|
||||
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL
|
||||
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR
|
||||
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON
|
||||
#endif
|
||||
|
||||
#cmakedefine SDL_VIDEO_DRIVER_MIR @SDL_VIDEO_DRIVER_MIR@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_MIR_DYNAMIC @SDL_VIDEO_DRIVER_MIR_DYNAMIC@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON @SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11 @SDL_VIDEO_DRIVER_X11@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC @SDL_VIDEO_DRIVER_X11_DYNAMIC@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT @SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR @SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA @SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 @SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR @SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS @SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE @SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XCURSOR @SDL_VIDEO_DRIVER_X11_XCURSOR@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XINERAMA @SDL_VIDEO_DRIVER_X11_XINERAMA@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XINPUT2 @SDL_VIDEO_DRIVER_X11_XINPUT2@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH @SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XRANDR @SDL_VIDEO_DRIVER_X11_XRANDR@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XSCRNSAVER @SDL_VIDEO_DRIVER_X11_XSCRNSAVER@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XSHAPE @SDL_VIDEO_DRIVER_X11_XSHAPE@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XVIDMODE @SDL_VIDEO_DRIVER_X11_XVIDMODE@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS @SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32 @SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY @SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM @SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM@
|
||||
|
||||
#cmakedefine SDL_VIDEO_RENDER_D3D @SDL_VIDEO_RENDER_D3D@
|
||||
#cmakedefine SDL_VIDEO_RENDER_D3D11 @SDL_VIDEO_RENDER_D3D11@
|
||||
#cmakedefine SDL_VIDEO_RENDER_OGL @SDL_VIDEO_RENDER_OGL@
|
||||
#cmakedefine SDL_VIDEO_RENDER_OGL_ES @SDL_VIDEO_RENDER_OGL_ES@
|
||||
#cmakedefine SDL_VIDEO_RENDER_OGL_ES2 @SDL_VIDEO_RENDER_OGL_ES2@
|
||||
#cmakedefine SDL_VIDEO_RENDER_DIRECTFB @SDL_VIDEO_RENDER_DIRECTFB@
|
||||
|
||||
/* Enable OpenGL support */
|
||||
#cmakedefine SDL_VIDEO_OPENGL @SDL_VIDEO_OPENGL@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_ES @SDL_VIDEO_OPENGL_ES@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_ES2 @SDL_VIDEO_OPENGL_ES2@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_BGL @SDL_VIDEO_OPENGL_BGL@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_CGL @SDL_VIDEO_OPENGL_CGL@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_GLX @SDL_VIDEO_OPENGL_GLX@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_WGL @SDL_VIDEO_OPENGL_WGL@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_EGL @SDL_VIDEO_OPENGL_EGL@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_OSMESA @SDL_VIDEO_OPENGL_OSMESA@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_OSMESA_DYNAMIC @SDL_VIDEO_OPENGL_OSMESA_DYNAMIC@
|
||||
|
||||
/* Enable system power support */
|
||||
#cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@
|
||||
#cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@
|
||||
#cmakedefine SDL_POWER_MACOSX @SDL_POWER_MACOSX@
|
||||
#cmakedefine SDL_POWER_HAIKU @SDL_POWER_HAIKU@
|
||||
#cmakedefine SDL_POWER_HARDWIRED @SDL_POWER_HARDWIRED@
|
||||
|
||||
/* Enable system filesystem support */
|
||||
#cmakedefine SDL_FILESYSTEM_HAIKU @SDL_FILESYSTEM_HAIKU@
|
||||
#cmakedefine SDL_FILESYSTEM_COCOA @SDL_FILESYSTEM_COCOA@
|
||||
#cmakedefine SDL_FILESYSTEM_DUMMY @SDL_FILESYSTEM_DUMMY@
|
||||
#cmakedefine SDL_FILESYSTEM_UNIX @SDL_FILESYSTEM_UNIX@
|
||||
#cmakedefine SDL_FILESYSTEM_WINDOWS @SDL_FILESYSTEM_WINDOWS@
|
||||
|
||||
/* Enable assembly routines */
|
||||
#cmakedefine SDL_ASSEMBLY_ROUTINES @SDL_ASSEMBLY_ROUTINES@
|
||||
#cmakedefine SDL_ALTIVEC_BLITTERS @SDL_ALTIVEC_BLITTERS@
|
||||
|
||||
|
||||
/* Platform specific definitions */
|
||||
#if !defined(__WIN32__)
|
||||
# if !defined(_STDINT_H_) && !defined(_STDINT_H) && !defined(HAVE_STDINT_H) && !defined(_HAVE_STDINT_H)
|
||||
typedef unsigned int size_t;
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef signed short int16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef signed long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
typedef unsigned long uintptr_t;
|
||||
# endif /* if (stdint.h isn't available) */
|
||||
#else /* __WIN32__ */
|
||||
# if !defined(_STDINT_H_) && !defined(HAVE_STDINT_H) && !defined(_HAVE_STDINT_H)
|
||||
# if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
|
||||
#define HAVE_STDINT_H 1
|
||||
# elif defined(_MSC_VER)
|
||||
typedef signed __int8 int8_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef signed __int16 int16_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef signed __int32 int32_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef signed __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
# ifndef _UINTPTR_T_DEFINED
|
||||
# ifdef _WIN64
|
||||
typedef unsigned __int64 uintptr_t;
|
||||
# else
|
||||
typedef unsigned int uintptr_t;
|
||||
# endif
|
||||
#define _UINTPTR_T_DEFINED
|
||||
# endif
|
||||
/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
|
||||
# if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
|
||||
#define DWORD_PTR DWORD
|
||||
# endif
|
||||
# if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
|
||||
#define LONG_PTR LONG
|
||||
# endif
|
||||
# else /* !__GNUC__ && !_MSC_VER */
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef signed short int16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef signed long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
# ifndef _SIZE_T_DEFINED_
|
||||
#define _SIZE_T_DEFINED_
|
||||
typedef unsigned int size_t;
|
||||
# endif
|
||||
typedef unsigned int uintptr_t;
|
||||
# endif /* __GNUC__ || _MSC_VER */
|
||||
# endif /* !_STDINT_H_ && !HAVE_STDINT_H */
|
||||
#endif /* __WIN32__ */
|
||||
|
||||
#endif /* _SDL_config_h */
|
|
@ -0,0 +1,333 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_config_h
|
||||
#define _SDL_config_h
|
||||
|
||||
/**
|
||||
* \file SDL_config.h.in
|
||||
*
|
||||
* This is a set of defines to configure the SDL features
|
||||
*/
|
||||
|
||||
/* General platform specific identifiers */
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/* Make sure that this isn't included by Visual C++ */
|
||||
#ifdef _MSC_VER
|
||||
#error You should run hg revert SDL_config.h
|
||||
#endif
|
||||
|
||||
/* C language features */
|
||||
#undef const
|
||||
#undef inline
|
||||
#undef volatile
|
||||
|
||||
/* C datatypes */
|
||||
#ifdef __LP64__
|
||||
#define SIZEOF_VOIDP 8
|
||||
#else
|
||||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
#undef HAVE_GCC_ATOMICS
|
||||
#undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET
|
||||
#undef HAVE_PTHREAD_SPINLOCK
|
||||
|
||||
/* Comment this if you want to build without any C library requirements */
|
||||
#undef HAVE_LIBC
|
||||
#if HAVE_LIBC
|
||||
|
||||
/* Useful headers */
|
||||
#undef HAVE_ALLOCA_H
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
#undef HAVE_STDIO_H
|
||||
#undef STDC_HEADERS
|
||||
#undef HAVE_STDLIB_H
|
||||
#undef HAVE_STDARG_H
|
||||
#undef HAVE_MALLOC_H
|
||||
#undef HAVE_MEMORY_H
|
||||
#undef HAVE_STRING_H
|
||||
#undef HAVE_STRINGS_H
|
||||
#undef HAVE_INTTYPES_H
|
||||
#undef HAVE_STDINT_H
|
||||
#undef HAVE_CTYPE_H
|
||||
#undef HAVE_MATH_H
|
||||
#undef HAVE_ICONV_H
|
||||
#undef HAVE_SIGNAL_H
|
||||
#undef HAVE_ALTIVEC_H
|
||||
#undef HAVE_PTHREAD_NP_H
|
||||
#undef HAVE_LIBUDEV_H
|
||||
#undef HAVE_DBUS_DBUS_H
|
||||
|
||||
/* C library functions */
|
||||
#undef HAVE_MALLOC
|
||||
#undef HAVE_CALLOC
|
||||
#undef HAVE_REALLOC
|
||||
#undef HAVE_FREE
|
||||
#undef HAVE_ALLOCA
|
||||
#ifndef __WIN32__ /* Don't use C runtime versions of these on Windows */
|
||||
#undef HAVE_GETENV
|
||||
#undef HAVE_SETENV
|
||||
#undef HAVE_PUTENV
|
||||
#undef HAVE_UNSETENV
|
||||
#endif
|
||||
#undef HAVE_QSORT
|
||||
#undef HAVE_ABS
|
||||
#undef HAVE_BCOPY
|
||||
#undef HAVE_MEMSET
|
||||
#undef HAVE_MEMCPY
|
||||
#undef HAVE_MEMMOVE
|
||||
#undef HAVE_MEMCMP
|
||||
#undef HAVE_STRLEN
|
||||
#undef HAVE_STRLCPY
|
||||
#undef HAVE_STRLCAT
|
||||
#undef HAVE_STRDUP
|
||||
#undef HAVE__STRREV
|
||||
#undef HAVE__STRUPR
|
||||
#undef HAVE__STRLWR
|
||||
#undef HAVE_INDEX
|
||||
#undef HAVE_RINDEX
|
||||
#undef HAVE_STRCHR
|
||||
#undef HAVE_STRRCHR
|
||||
#undef HAVE_STRSTR
|
||||
#undef HAVE_ITOA
|
||||
#undef HAVE__LTOA
|
||||
#undef HAVE__UITOA
|
||||
#undef HAVE__ULTOA
|
||||
#undef HAVE_STRTOL
|
||||
#undef HAVE_STRTOUL
|
||||
#undef HAVE__I64TOA
|
||||
#undef HAVE__UI64TOA
|
||||
#undef HAVE_STRTOLL
|
||||
#undef HAVE_STRTOULL
|
||||
#undef HAVE_STRTOD
|
||||
#undef HAVE_ATOI
|
||||
#undef HAVE_ATOF
|
||||
#undef HAVE_STRCMP
|
||||
#undef HAVE_STRNCMP
|
||||
#undef HAVE__STRICMP
|
||||
#undef HAVE_STRCASECMP
|
||||
#undef HAVE__STRNICMP
|
||||
#undef HAVE_STRNCASECMP
|
||||
#undef HAVE_SSCANF
|
||||
#undef HAVE_VSSCANF
|
||||
#undef HAVE_SNPRINTF
|
||||
#undef HAVE_VSNPRINTF
|
||||
#undef HAVE_M_PI
|
||||
#undef HAVE_ATAN
|
||||
#undef HAVE_ATAN2
|
||||
#undef HAVE_ACOS
|
||||
#undef HAVE_ASIN
|
||||
#undef HAVE_CEIL
|
||||
#undef HAVE_COPYSIGN
|
||||
#undef HAVE_COS
|
||||
#undef HAVE_COSF
|
||||
#undef HAVE_FABS
|
||||
#undef HAVE_FLOOR
|
||||
#undef HAVE_LOG
|
||||
#undef HAVE_POW
|
||||
#undef HAVE_SCALBN
|
||||
#undef HAVE_SIN
|
||||
#undef HAVE_SINF
|
||||
#undef HAVE_SQRT
|
||||
#undef HAVE_FSEEKO
|
||||
#undef HAVE_FSEEKO64
|
||||
#undef HAVE_SIGACTION
|
||||
#undef HAVE_SA_SIGACTION
|
||||
#undef HAVE_SETJMP
|
||||
#undef HAVE_NANOSLEEP
|
||||
#undef HAVE_SYSCONF
|
||||
#undef HAVE_SYSCTLBYNAME
|
||||
#undef HAVE_CLOCK_GETTIME
|
||||
#undef HAVE_GETPAGESIZE
|
||||
#undef HAVE_MPROTECT
|
||||
#undef HAVE_ICONV
|
||||
#undef HAVE_PTHREAD_SETNAME_NP
|
||||
#undef HAVE_PTHREAD_SET_NAME_NP
|
||||
#undef HAVE_SEM_TIMEDWAIT
|
||||
|
||||
#else
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDDEF_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#endif /* HAVE_LIBC */
|
||||
|
||||
/* SDL internal assertion support */
|
||||
#undef SDL_DEFAULT_ASSERT_LEVEL
|
||||
|
||||
/* Allow disabling of core subsystems */
|
||||
#undef SDL_ATOMIC_DISABLED
|
||||
#undef SDL_AUDIO_DISABLED
|
||||
#undef SDL_CPUINFO_DISABLED
|
||||
#undef SDL_EVENTS_DISABLED
|
||||
#undef SDL_FILE_DISABLED
|
||||
#undef SDL_JOYSTICK_DISABLED
|
||||
#undef SDL_HAPTIC_DISABLED
|
||||
#undef SDL_LOADSO_DISABLED
|
||||
#undef SDL_RENDER_DISABLED
|
||||
#undef SDL_THREADS_DISABLED
|
||||
#undef SDL_TIMERS_DISABLED
|
||||
#undef SDL_VIDEO_DISABLED
|
||||
#undef SDL_POWER_DISABLED
|
||||
#undef SDL_FILESYSTEM_DISABLED
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#undef SDL_AUDIO_DRIVER_ALSA
|
||||
#undef SDL_AUDIO_DRIVER_ALSA_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_ARTS
|
||||
#undef SDL_AUDIO_DRIVER_ARTS_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_PULSEAUDIO
|
||||
#undef SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_HAIKU
|
||||
#undef SDL_AUDIO_DRIVER_BSD
|
||||
#undef SDL_AUDIO_DRIVER_COREAUDIO
|
||||
#undef SDL_AUDIO_DRIVER_DISK
|
||||
#undef SDL_AUDIO_DRIVER_DUMMY
|
||||
#undef SDL_AUDIO_DRIVER_XAUDIO2
|
||||
#undef SDL_AUDIO_DRIVER_DSOUND
|
||||
#undef SDL_AUDIO_DRIVER_ESD
|
||||
#undef SDL_AUDIO_DRIVER_ESD_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_NAS
|
||||
#undef SDL_AUDIO_DRIVER_NAS_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_SNDIO
|
||||
#undef SDL_AUDIO_DRIVER_SNDIO_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_OSS
|
||||
#undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H
|
||||
#undef SDL_AUDIO_DRIVER_PAUDIO
|
||||
#undef SDL_AUDIO_DRIVER_QSA
|
||||
#undef SDL_AUDIO_DRIVER_SUNAUDIO
|
||||
#undef SDL_AUDIO_DRIVER_WINMM
|
||||
#undef SDL_AUDIO_DRIVER_FUSIONSOUND
|
||||
#undef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC
|
||||
|
||||
/* Enable various input drivers */
|
||||
#undef SDL_INPUT_LINUXEV
|
||||
#undef SDL_INPUT_LINUXKD
|
||||
#undef SDL_INPUT_TSLIB
|
||||
#undef SDL_JOYSTICK_HAIKU
|
||||
#undef SDL_JOYSTICK_DINPUT
|
||||
#undef SDL_JOYSTICK_DUMMY
|
||||
#undef SDL_JOYSTICK_IOKIT
|
||||
#undef SDL_JOYSTICK_LINUX
|
||||
#undef SDL_JOYSTICK_WINMM
|
||||
#undef SDL_JOYSTICK_USBHID
|
||||
#undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H
|
||||
#undef SDL_HAPTIC_DUMMY
|
||||
#undef SDL_HAPTIC_LINUX
|
||||
#undef SDL_HAPTIC_IOKIT
|
||||
#undef SDL_HAPTIC_DINPUT
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#undef SDL_LOADSO_HAIKU
|
||||
#undef SDL_LOADSO_DLOPEN
|
||||
#undef SDL_LOADSO_DUMMY
|
||||
#undef SDL_LOADSO_LDG
|
||||
#undef SDL_LOADSO_WINDOWS
|
||||
|
||||
/* Enable various threading systems */
|
||||
#undef SDL_THREAD_PTHREAD
|
||||
#undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX
|
||||
#undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP
|
||||
#undef SDL_THREAD_WINDOWS
|
||||
|
||||
/* Enable various timer systems */
|
||||
#undef SDL_TIMER_HAIKU
|
||||
#undef SDL_TIMER_DUMMY
|
||||
#undef SDL_TIMER_UNIX
|
||||
#undef SDL_TIMER_WINDOWS
|
||||
|
||||
/* Enable various video drivers */
|
||||
#undef SDL_VIDEO_DRIVER_HAIKU
|
||||
#undef SDL_VIDEO_DRIVER_COCOA
|
||||
#undef SDL_VIDEO_DRIVER_DIRECTFB
|
||||
#undef SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC
|
||||
#undef SDL_VIDEO_DRIVER_DUMMY
|
||||
#undef SDL_VIDEO_DRIVER_WINDOWS
|
||||
#undef SDL_VIDEO_DRIVER_WAYLAND
|
||||
#undef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH
|
||||
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC
|
||||
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL
|
||||
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR
|
||||
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON
|
||||
#undef SDL_VIDEO_DRIVER_MIR
|
||||
#undef SDL_VIDEO_DRIVER_MIR_DYNAMIC
|
||||
#undef SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON
|
||||
#undef SDL_VIDEO_DRIVER_X11
|
||||
#undef SDL_VIDEO_DRIVER_RPI
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE
|
||||
#undef SDL_VIDEO_DRIVER_X11_XCURSOR
|
||||
#undef SDL_VIDEO_DRIVER_X11_XINERAMA
|
||||
#undef SDL_VIDEO_DRIVER_X11_XINPUT2
|
||||
#undef SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH
|
||||
#undef SDL_VIDEO_DRIVER_X11_XRANDR
|
||||
#undef SDL_VIDEO_DRIVER_X11_XSCRNSAVER
|
||||
#undef SDL_VIDEO_DRIVER_X11_XSHAPE
|
||||
#undef SDL_VIDEO_DRIVER_X11_XVIDMODE
|
||||
#undef SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS
|
||||
#undef SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32
|
||||
#undef SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY
|
||||
#undef SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
|
||||
|
||||
#undef SDL_VIDEO_RENDER_D3D
|
||||
#undef SDL_VIDEO_RENDER_D3D11
|
||||
#undef SDL_VIDEO_RENDER_OGL
|
||||
#undef SDL_VIDEO_RENDER_OGL_ES
|
||||
#undef SDL_VIDEO_RENDER_OGL_ES2
|
||||
#undef SDL_VIDEO_RENDER_DIRECTFB
|
||||
|
||||
/* Enable OpenGL support */
|
||||
#undef SDL_VIDEO_OPENGL
|
||||
#undef SDL_VIDEO_OPENGL_ES
|
||||
#undef SDL_VIDEO_OPENGL_ES2
|
||||
#undef SDL_VIDEO_OPENGL_BGL
|
||||
#undef SDL_VIDEO_OPENGL_CGL
|
||||
#undef SDL_VIDEO_OPENGL_EGL
|
||||
#undef SDL_VIDEO_OPENGL_GLX
|
||||
#undef SDL_VIDEO_OPENGL_WGL
|
||||
#undef SDL_VIDEO_OPENGL_OSMESA
|
||||
#undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC
|
||||
|
||||
/* Enable system power support */
|
||||
#undef SDL_POWER_LINUX
|
||||
#undef SDL_POWER_WINDOWS
|
||||
#undef SDL_POWER_MACOSX
|
||||
#undef SDL_POWER_HAIKU
|
||||
#undef SDL_POWER_HARDWIRED
|
||||
|
||||
/* Enable system filesystem support */
|
||||
#undef SDL_FILESYSTEM_HAIKU
|
||||
#undef SDL_FILESYSTEM_COCOA
|
||||
#undef SDL_FILESYSTEM_DUMMY
|
||||
#undef SDL_FILESYSTEM_UNIX
|
||||
#undef SDL_FILESYSTEM_WINDOWS
|
||||
|
||||
/* Enable assembly routines */
|
||||
#undef SDL_ASSEMBLY_ROUTINES
|
||||
#undef SDL_ALTIVEC_BLITTERS
|
||||
|
||||
#endif /* _SDL_config_h */
|
|
@ -0,0 +1,144 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_config_android_h
|
||||
#define _SDL_config_android_h
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/**
|
||||
* \file SDL_config_android.h
|
||||
*
|
||||
* This is a configuration that can be used to build SDL for Android
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#define HAVE_GCC_ATOMICS 1
|
||||
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_STRTOD 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_M_PI 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
#define HAVE_SYSCONF 1
|
||||
|
||||
#define SIZEOF_VOIDP 4
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_ANDROID 1
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable various input drivers */
|
||||
#define SDL_JOYSTICK_ANDROID 1
|
||||
#define SDL_HAPTIC_DUMMY 1
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
||||
/* Enable various threading systems */
|
||||
#define SDL_THREAD_PTHREAD 1
|
||||
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
|
||||
|
||||
/* Enable various timer systems */
|
||||
#define SDL_TIMER_UNIX 1
|
||||
|
||||
/* Enable various video drivers */
|
||||
#define SDL_VIDEO_DRIVER_ANDROID 1
|
||||
|
||||
/* Enable OpenGL ES */
|
||||
#define SDL_VIDEO_OPENGL_ES 1
|
||||
#define SDL_VIDEO_OPENGL_ES2 1
|
||||
#define SDL_VIDEO_OPENGL_EGL 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_ANDROID 1
|
||||
|
||||
/* !!! FIXME: what does Android do for filesystem stuff? */
|
||||
#define SDL_FILESYSTEM_DUMMY 1
|
||||
|
||||
#endif /* _SDL_config_android_h */
|
|
@ -0,0 +1,155 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_config_iphoneos_h
|
||||
#define _SDL_config_iphoneos_h
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
#ifdef __LP64__
|
||||
#define SIZEOF_VOIDP 8
|
||||
#else
|
||||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
#define HAVE_GCC_ATOMICS 1
|
||||
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_STRTOD 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_M_PI 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
#define HAVE_SYSCONF 1
|
||||
#define HAVE_SYSCTLBYNAME 1
|
||||
|
||||
/* enable iPhone version of Core Audio driver */
|
||||
#define SDL_AUDIO_DRIVER_COREAUDIO 1
|
||||
/* Enable the dummy audio driver (src/audio/dummy/\*.c) */
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
|
||||
/* Enable Unix style SO loading */
|
||||
/* Technically this works, but it violates the iPhone developer agreement */
|
||||
/* #define SDL_LOADSO_DLOPEN 1 */
|
||||
|
||||
/* Enable the stub shared object loader (src/loadso/dummy/\*.c) */
|
||||
#define SDL_LOADSO_DISABLED 1
|
||||
|
||||
/* Enable various threading systems */
|
||||
#define SDL_THREAD_PTHREAD 1
|
||||
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
|
||||
|
||||
/* Enable various timer systems */
|
||||
#define SDL_TIMER_UNIX 1
|
||||
|
||||
/* Supported video drivers */
|
||||
#define SDL_VIDEO_DRIVER_UIKIT 1
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
|
||||
/* enable OpenGL ES */
|
||||
#define SDL_VIDEO_OPENGL_ES 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_UIKIT 1
|
||||
|
||||
/* enable iPhone keyboard support */
|
||||
#define SDL_IPHONE_KEYBOARD 1
|
||||
|
||||
/* enable joystick subsystem */
|
||||
#define SDL_JOYSTICK_DISABLED 0
|
||||
|
||||
/* Set max recognized G-force from accelerometer
|
||||
See src/joystick/uikit/SDLUIAccelerationDelegate.m for notes on why this is needed
|
||||
*/
|
||||
#define SDL_IPHONE_MAX_GFORCE 5.0
|
||||
|
||||
/* enable filesystem support */
|
||||
#define SDL_FILESYSTEM_COCOA 1
|
||||
|
||||
#endif /* _SDL_config_iphoneos_h */
|
|
@ -0,0 +1,184 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_config_macosx_h
|
||||
#define _SDL_config_macosx_h
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/* This gets us MAC_OS_X_VERSION_MIN_REQUIRED... */
|
||||
#include <AvailabilityMacros.h>
|
||||
|
||||
/* This is a set of defines to configure the SDL features */
|
||||
|
||||
#ifdef __LP64__
|
||||
#define SIZEOF_VOIDP 8
|
||||
#else
|
||||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
/* Useful headers */
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_STRTOD 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
#define HAVE_SYSCONF 1
|
||||
#define HAVE_SYSCTLBYNAME 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ASIN 1
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_COREAUDIO 1
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable various input drivers */
|
||||
#define SDL_JOYSTICK_IOKIT 1
|
||||
#define SDL_HAPTIC_IOKIT 1
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
||||
/* Enable various threading systems */
|
||||
#define SDL_THREAD_PTHREAD 1
|
||||
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
|
||||
|
||||
/* Enable various timer systems */
|
||||
#define SDL_TIMER_UNIX 1
|
||||
|
||||
/* Enable various video drivers */
|
||||
#define SDL_VIDEO_DRIVER_COCOA 1
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
#undef SDL_VIDEO_DRIVER_X11
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/usr/X11R6/lib/libX11.6.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/usr/X11R6/lib/libXext.6.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/usr/X11R6/lib/libXinerama.1.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/usr/X11R6/lib/libXi.6.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/usr/X11R6/lib/libXrandr.2.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/usr/X11R6/lib/libXss.1.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/usr/X11R6/lib/libXxf86vm.1.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_XINERAMA 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XRANDR 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XSHAPE 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XVIDMODE 1
|
||||
#define SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM 1
|
||||
|
||||
#ifdef MAC_OS_X_VERSION_10_8
|
||||
/*
|
||||
* No matter the versions targeted, this is the 10.8 or later SDK, so you have
|
||||
* to use the external Xquartz, which is a more modern Xlib. Previous SDKs
|
||||
* used an older Xlib.
|
||||
*/
|
||||
#define SDL_VIDEO_DRIVER_X11_XINPUT2 1
|
||||
#define SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1
|
||||
#define SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY 1
|
||||
#endif
|
||||
|
||||
#ifndef SDL_VIDEO_RENDER_OGL
|
||||
#define SDL_VIDEO_RENDER_OGL 1
|
||||
#endif
|
||||
|
||||
/* Enable OpenGL support */
|
||||
#ifndef SDL_VIDEO_OPENGL
|
||||
#define SDL_VIDEO_OPENGL 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_OPENGL_CGL
|
||||
#define SDL_VIDEO_OPENGL_CGL 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_OPENGL_GLX
|
||||
#define SDL_VIDEO_OPENGL_GLX 1
|
||||
#endif
|
||||
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_MACOSX 1
|
||||
|
||||
/* enable filesystem support */
|
||||
#define SDL_FILESYSTEM_COCOA 1
|
||||
|
||||
/* Enable assembly routines */
|
||||
#define SDL_ASSEMBLY_ROUTINES 1
|
||||
#ifdef __ppc__
|
||||
#define SDL_ALTIVEC_BLITTERS 1
|
||||
#endif
|
||||
|
||||
#endif /* _SDL_config_macosx_h */
|
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_config_minimal_h
|
||||
#define _SDL_config_minimal_h
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/**
|
||||
* \file SDL_config_minimal.h
|
||||
*
|
||||
* This is the minimal configuration that can be used to build SDL.
|
||||
*/
|
||||
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDDEF_H 1
|
||||
|
||||
/* Most everything except Visual Studio 2008 and earlier has stdint.h now */
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1600)
|
||||
/* Here are some reasonable defaults */
|
||||
typedef unsigned int size_t;
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef signed short int16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef signed long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
typedef unsigned long uintptr_t;
|
||||
#else
|
||||
#define HAVE_STDINT_H 1
|
||||
#endif /* Visual Studio 2008 */
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define HAVE_GCC_SYNC_LOCK_TEST_AND_SET 1
|
||||
#endif
|
||||
|
||||
/* Enable the dummy audio driver (src/audio/dummy/\*.c) */
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable the stub joystick driver (src/joystick/dummy/\*.c) */
|
||||
#define SDL_JOYSTICK_DISABLED 1
|
||||
|
||||
/* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
|
||||
/* Enable the stub shared object loader (src/loadso/dummy/\*.c) */
|
||||
#define SDL_LOADSO_DISABLED 1
|
||||
|
||||
/* Enable the stub thread support (src/thread/generic/\*.c) */
|
||||
#define SDL_THREADS_DISABLED 1
|
||||
|
||||
/* Enable the stub timer support (src/timer/dummy/\*.c) */
|
||||
#define SDL_TIMERS_DISABLED 1
|
||||
|
||||
/* Enable the dummy video driver (src/video/dummy/\*.c) */
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable the dummy filesystem driver (src/filesystem/dummy/\*.c) */
|
||||
#define SDL_FILESYSTEM_DUMMY 1
|
||||
|
||||
#endif /* _SDL_config_minimal_h */
|
|
@ -0,0 +1,124 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_config_h
|
||||
#define _SDL_config_h
|
||||
|
||||
/* This is a set of defines to configure the SDL features */
|
||||
|
||||
/* General platform specific identifiers */
|
||||
#include "SDL_platform.h"
|
||||
|
||||
#ifdef __LP64__
|
||||
#define SIZEOF_VOIDP 8
|
||||
#else
|
||||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
#define SDL_BYTEORDER 1234
|
||||
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_MALLOC_H 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_ICONV_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_M_PI 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
#define SDL_AUDIO_DRIVER_OSS 1
|
||||
|
||||
#define SDL_INPUT_LINUXEV 1
|
||||
#define SDL_INPUT_TSLIB 1
|
||||
#define SDL_JOYSTICK_LINUX 1
|
||||
#define SDL_HAPTIC_LINUX 1
|
||||
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
||||
#define SDL_THREAD_PTHREAD 1
|
||||
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP 1
|
||||
|
||||
#define SDL_TIMER_UNIX 1
|
||||
#define SDL_FILESYSTEM_UNIX 1
|
||||
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
#define SDL_VIDEO_DRIVER_X11 1
|
||||
#define SDL_VIDEO_DRIVER_PANDORA 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES 1
|
||||
#define SDL_VIDEO_OPENGL_ES 1
|
||||
|
||||
#endif /* _SDL_config_h */
|
|
@ -0,0 +1,140 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_config_psp_h
|
||||
#define _SDL_config_psp_h
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define HAVE_GCC_SYNC_LOCK_TEST_AND_SET 1
|
||||
#endif
|
||||
|
||||
#define HAVE_GCC_ATOMICS 1
|
||||
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_STRTOD 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_M_PI 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
/* #define HAVE_SYSCONF 1 */
|
||||
/* #define HAVE_SIGACTION 1 */
|
||||
|
||||
|
||||
/* PSP isn't that sophisticated */
|
||||
#define LACKS_SYS_MMAN_H 1
|
||||
|
||||
/* Enable the stub thread support (src/thread/psp/\*.c) */
|
||||
#define SDL_THREAD_PSP 1
|
||||
|
||||
/* Enable the stub timer support (src/timer/psp/\*.c) */
|
||||
#define SDL_TIMERS_PSP 1
|
||||
|
||||
/* Enable the stub joystick driver (src/joystick/psp/\*.c) */
|
||||
#define SDL_JOYSTICK_PSP 1
|
||||
|
||||
/* Enable the stub audio driver (src/audio/psp/\*.c) */
|
||||
#define SDL_AUDIO_DRIVER_PSP 1
|
||||
|
||||
/* PSP video dirver */
|
||||
#define SDL_VIDEO_DRIVER_PSP 1
|
||||
|
||||
/* PSP render dirver */
|
||||
#define SDL_VIDEO_RENDER_PSP 1
|
||||
|
||||
#define SDL_POWER_PSP 1
|
||||
|
||||
/* !!! FIXME: what does PSP do for filesystem stuff? */
|
||||
#define SDL_FILESYSTEM_DUMMY 1
|
||||
|
||||
/* PSP doesn't have haptic device (src/haptic/dummy/\*.c) */
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
|
||||
/* PSP can't load shared object (src/loadso/dummy/\*.c) */
|
||||
#define SDL_LOADSO_DISABLED 1
|
||||
|
||||
|
||||
#endif /* _SDL_config_psp_h */
|
|
@ -0,0 +1,210 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_config_windows_h
|
||||
#define _SDL_config_windows_h
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/* This is a set of defines to configure the SDL features */
|
||||
|
||||
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
|
||||
#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
|
||||
#define HAVE_STDINT_H 1
|
||||
#elif defined(_MSC_VER)
|
||||
typedef signed __int8 int8_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef signed __int16 int16_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef signed __int32 int32_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef signed __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
#ifndef _UINTPTR_T_DEFINED
|
||||
#ifdef _WIN64
|
||||
typedef unsigned __int64 uintptr_t;
|
||||
#else
|
||||
typedef unsigned int uintptr_t;
|
||||
#endif
|
||||
#define _UINTPTR_T_DEFINED
|
||||
#endif
|
||||
/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
|
||||
#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
|
||||
#define DWORD_PTR DWORD
|
||||
#endif
|
||||
#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
|
||||
#define LONG_PTR LONG
|
||||
#endif
|
||||
#else /* !__GNUC__ && !_MSC_VER */
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef signed short int16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef signed long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
#ifndef _SIZE_T_DEFINED_
|
||||
#define _SIZE_T_DEFINED_
|
||||
typedef unsigned int size_t;
|
||||
#endif
|
||||
typedef unsigned int uintptr_t;
|
||||
#endif /* __GNUC__ || _MSC_VER */
|
||||
#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
|
||||
|
||||
#ifdef _WIN64
|
||||
# define SIZEOF_VOIDP 8
|
||||
#else
|
||||
# define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
|
||||
#ifdef HAVE_LIBC
|
||||
/* Useful headers */
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE__STRREV 1
|
||||
#define HAVE__STRUPR 1
|
||||
#define HAVE__STRLWR 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE__LTOA 1
|
||||
#define HAVE__ULTOA 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOD 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE__STRICMP 1
|
||||
#define HAVE__STRNICMP 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#if _MSC_VER >= 1800
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_SCALBN 1
|
||||
#endif
|
||||
#if !defined(_MSC_VER) || defined(_USE_MATH_DEFINES)
|
||||
#define HAVE_M_PI 1
|
||||
#endif
|
||||
#else
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDDEF_H 1
|
||||
#endif
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_DSOUND 1
|
||||
#define SDL_AUDIO_DRIVER_XAUDIO2 1
|
||||
#define SDL_AUDIO_DRIVER_WINMM 1
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable various input drivers */
|
||||
#define SDL_JOYSTICK_DINPUT 1
|
||||
#define SDL_HAPTIC_DINPUT 1
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_WINDOWS 1
|
||||
|
||||
/* Enable various threading systems */
|
||||
#define SDL_THREAD_WINDOWS 1
|
||||
|
||||
/* Enable various timer systems */
|
||||
#define SDL_TIMER_WINDOWS 1
|
||||
|
||||
/* Enable various video drivers */
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
#define SDL_VIDEO_DRIVER_WINDOWS 1
|
||||
|
||||
#ifndef SDL_VIDEO_RENDER_D3D
|
||||
#define SDL_VIDEO_RENDER_D3D 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_RENDER_D3D11
|
||||
#define SDL_VIDEO_RENDER_D3D11 0
|
||||
#endif
|
||||
|
||||
/* Enable OpenGL support */
|
||||
#ifndef SDL_VIDEO_OPENGL
|
||||
#define SDL_VIDEO_OPENGL 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_OPENGL_WGL
|
||||
#define SDL_VIDEO_OPENGL_WGL 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_RENDER_OGL
|
||||
#define SDL_VIDEO_RENDER_OGL 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_RENDER_OGL_ES2
|
||||
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_OPENGL_ES2
|
||||
#define SDL_VIDEO_OPENGL_ES2 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_OPENGL_EGL
|
||||
#define SDL_VIDEO_OPENGL_EGL 1
|
||||
#endif
|
||||
|
||||
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_WINDOWS 1
|
||||
|
||||
/* Enable filesystem support */
|
||||
#define SDL_FILESYSTEM_WINDOWS 1
|
||||
|
||||
/* Enable assembly routines (Win64 doesn't have inline asm) */
|
||||
#ifndef _WIN64
|
||||
#define SDL_ASSEMBLY_ROUTINES 1
|
||||
#endif
|
||||
|
||||
#endif /* _SDL_config_windows_h */
|
|
@ -0,0 +1,190 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_config_windows_h
|
||||
#define _SDL_config_windows_h
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/* This is a set of defines to configure the SDL features */
|
||||
|
||||
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
|
||||
#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
|
||||
#define HAVE_STDINT_H 1
|
||||
#elif defined(_MSC_VER)
|
||||
typedef signed __int8 int8_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef signed __int16 int16_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef signed __int32 int32_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef signed __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
#ifndef _UINTPTR_T_DEFINED
|
||||
#ifdef _WIN64
|
||||
typedef unsigned __int64 uintptr_t;
|
||||
#else
|
||||
typedef unsigned int uintptr_t;
|
||||
#endif
|
||||
#define _UINTPTR_T_DEFINED
|
||||
#endif
|
||||
/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
|
||||
#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
|
||||
#define DWORD_PTR DWORD
|
||||
#endif
|
||||
#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
|
||||
#define LONG_PTR LONG
|
||||
#endif
|
||||
#else /* !__GNUC__ && !_MSC_VER */
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef signed short int16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef signed long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
#ifndef _SIZE_T_DEFINED_
|
||||
#define _SIZE_T_DEFINED_
|
||||
typedef unsigned int size_t;
|
||||
#endif
|
||||
typedef unsigned int uintptr_t;
|
||||
#endif /* __GNUC__ || _MSC_VER */
|
||||
#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
|
||||
|
||||
#ifdef _WIN64
|
||||
# define SIZEOF_VOIDP 8
|
||||
#else
|
||||
# define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
/* Useful headers */
|
||||
#define HAVE_LIBC 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_FLOAT_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE__STRREV 1
|
||||
#define HAVE__STRUPR 1
|
||||
//#define HAVE__STRLWR 1 // TODO, WinRT: consider using _strlwr_s instead
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
//#define HAVE_ITOA 1 // TODO, WinRT: consider using _itoa_s instead
|
||||
//#define HAVE__LTOA 1 // TODO, WinRT: consider using _ltoa_s instead
|
||||
//#define HAVE__ULTOA 1 // TODO, WinRT: consider using _ultoa_s instead
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
//#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOD 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE__STRICMP 1
|
||||
#define HAVE__STRNICMP 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
//#define HAVE_SSCANF 1 // TODO, WinRT: consider using sscanf_s instead
|
||||
#define HAVE_M_PI 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE__COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_POW 1
|
||||
//#define HAVE_SCALBN 1
|
||||
#define HAVE__SCALB 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE__FSEEKI64 1
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_XAUDIO2 1
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable various input drivers */
|
||||
// TODO, WinRT: Get haptic support working
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
|
||||
#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||
#define SDL_JOYSTICK_DISABLED 1
|
||||
#else
|
||||
#define SDL_JOYSTICK_XINPUT 1
|
||||
#endif
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_WINDOWS 1
|
||||
|
||||
/* Enable various threading systems */
|
||||
#define SDL_THREAD_STDCPP 1
|
||||
|
||||
/* Enable various timer systems */
|
||||
#define SDL_TIMER_WINDOWS 1
|
||||
|
||||
/* Enable various video drivers */
|
||||
#define SDL_VIDEO_DRIVER_WINRT 1
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable OpenGL ES 2.0 (via a modified ANGLE library) */
|
||||
#if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP /* TODO, WinRT: try adding OpenGL ES 2 support for Windows Phone 8 */
|
||||
#define SDL_VIDEO_OPENGL_ES2 1
|
||||
#define SDL_VIDEO_OPENGL_EGL 1
|
||||
#endif
|
||||
|
||||
/* Enable appropriate renderer(s) */
|
||||
#define SDL_VIDEO_RENDER_D3D11 1
|
||||
|
||||
#if SDL_VIDEO_OPENGL_ES2
|
||||
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||
#endif
|
||||
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_WINRT 1
|
||||
|
||||
/* Enable assembly routines (Win64 doesn't have inline asm) */
|
||||
#ifndef _WIN64
|
||||
#define SDL_ASSEMBLY_ROUTINES 1
|
||||
#endif
|
||||
|
||||
#endif /* _SDL_config_windows_h */
|
|
@ -0,0 +1,118 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_config_h
|
||||
#define _SDL_config_h
|
||||
|
||||
/* This is a set of defines to configure the SDL features */
|
||||
|
||||
/* General platform specific identifiers */
|
||||
#include "SDL_platform.h"
|
||||
|
||||
#define SDL_BYTEORDER 1234
|
||||
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_MALLOC_H 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_ICONV_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_M_PI 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
#define HAVE_POW 1
|
||||
|
||||
#define SDL_CDROM_DISABLED 1
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
#define SDL_AUDIO_DRIVER_OSS 1
|
||||
|
||||
#define SDL_INPUT_LINUXEV 1
|
||||
#define SDL_INPUT_TSLIB 1
|
||||
#define SDL_JOYSTICK_LINUX 1
|
||||
#define SDL_HAPTIC_LINUX 1
|
||||
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
||||
#define SDL_THREAD_PTHREAD 1
|
||||
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP 1
|
||||
|
||||
#define SDL_TIMER_UNIX 1
|
||||
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
#define SDL_VIDEO_DRIVER_PANDORA 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES 1
|
||||
#define SDL_VIDEO_OPENGL_ES 1
|
||||
|
||||
#endif /* _SDL_config_h */
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
|
@ -0,0 +1,156 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_cpuinfo.h
|
||||
*
|
||||
* CPU feature detection for SDL.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_cpuinfo_h
|
||||
#define _SDL_cpuinfo_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
/* Need to do this here because intrin.h has C++ code in it */
|
||||
/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))
|
||||
#include <intrin.h>
|
||||
#ifndef _WIN64
|
||||
#define __MMX__
|
||||
#define __3dNOW__
|
||||
#endif
|
||||
#define __SSE__
|
||||
#define __SSE2__
|
||||
#elif defined(__MINGW64_VERSION_MAJOR)
|
||||
#include <intrin.h>
|
||||
#else
|
||||
#ifdef __ALTIVEC__
|
||||
#if HAVE_ALTIVEC_H && !defined(__APPLE_ALTIVEC__)
|
||||
#include <altivec.h>
|
||||
#undef pixel
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __MMX__
|
||||
#include <mmintrin.h>
|
||||
#endif
|
||||
#ifdef __3dNOW__
|
||||
#include <mm3dnow.h>
|
||||
#endif
|
||||
#ifdef __SSE__
|
||||
#include <xmmintrin.h>
|
||||
#endif
|
||||
#ifdef __SSE2__
|
||||
#include <emmintrin.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* This is a guess for the cacheline size used for padding.
|
||||
* Most x86 processors have a 64 byte cache line.
|
||||
* The 64-bit PowerPC processors have a 128 byte cache line.
|
||||
* We'll use the larger value to be generally safe.
|
||||
*/
|
||||
#define SDL_CACHELINE_SIZE 128
|
||||
|
||||
/**
|
||||
* This function returns the number of CPU cores available.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetCPUCount(void);
|
||||
|
||||
/**
|
||||
* This function returns the L1 cache line size of the CPU
|
||||
*
|
||||
* This is useful for determining multi-threaded structure padding
|
||||
* or SIMD prefetch sizes.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has the RDTSC instruction.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has AltiVec features.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has MMX features.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has 3DNow! features.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has SSE features.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has SSE2 features.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has SSE3 features.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE3(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has SSE4.1 features.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE41(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has SSE4.2 features.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE42(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has AVX features.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);
|
||||
|
||||
/**
|
||||
* This function returns the amount of RAM configured in the system, in MB.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_cpuinfo_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,239 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_endian.h
|
||||
*
|
||||
* Functions for reading and writing endian-specific values
|
||||
*/
|
||||
|
||||
#ifndef _SDL_endian_h
|
||||
#define _SDL_endian_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
/**
|
||||
* \name The two types of endianness
|
||||
*/
|
||||
/* @{ */
|
||||
#define SDL_LIL_ENDIAN 1234
|
||||
#define SDL_BIG_ENDIAN 4321
|
||||
/* @} */
|
||||
|
||||
#ifndef SDL_BYTEORDER /* Not defined in SDL_config.h? */
|
||||
#ifdef __linux__
|
||||
#include <endian.h>
|
||||
#define SDL_BYTEORDER __BYTE_ORDER
|
||||
#else /* __linux __ */
|
||||
#if defined(__hppa__) || \
|
||||
defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
|
||||
(defined(__MIPS__) && defined(__MISPEB__)) || \
|
||||
defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \
|
||||
defined(__sparc__)
|
||||
#define SDL_BYTEORDER SDL_BIG_ENDIAN
|
||||
#else
|
||||
#define SDL_BYTEORDER SDL_LIL_ENDIAN
|
||||
#endif
|
||||
#endif /* __linux __ */
|
||||
#endif /* !SDL_BYTEORDER */
|
||||
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \file SDL_endian.h
|
||||
*/
|
||||
#if defined(__GNUC__) && defined(__i386__) && \
|
||||
!(__GNUC__ == 2 && __GNUC_MINOR__ == 95 /* broken gcc version */)
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
__asm__("xchgb %b0,%h0": "=q"(x):"0"(x));
|
||||
return x;
|
||||
}
|
||||
#elif defined(__GNUC__) && defined(__x86_64__)
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
__asm__("xchgb %b0,%h0": "=Q"(x):"0"(x));
|
||||
return x;
|
||||
}
|
||||
#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
int result;
|
||||
|
||||
__asm__("rlwimi %0,%2,8,16,23": "=&r"(result):"0"(x >> 8), "r"(x));
|
||||
return (Uint16)result;
|
||||
}
|
||||
#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__)
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
__asm__("rorw #8,%0": "=d"(x): "0"(x):"cc");
|
||||
return x;
|
||||
}
|
||||
#else
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
return SDL_static_cast(Uint16, ((x << 8) | (x >> 8)));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
__asm__("bswap %0": "=r"(x):"0"(x));
|
||||
return x;
|
||||
}
|
||||
#elif defined(__GNUC__) && defined(__x86_64__)
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
__asm__("bswapl %0": "=r"(x):"0"(x));
|
||||
return x;
|
||||
}
|
||||
#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
Uint32 result;
|
||||
|
||||
__asm__("rlwimi %0,%2,24,16,23": "=&r"(result):"0"(x >> 24), "r"(x));
|
||||
__asm__("rlwimi %0,%2,8,8,15": "=&r"(result):"0"(result), "r"(x));
|
||||
__asm__("rlwimi %0,%2,24,0,7": "=&r"(result):"0"(result), "r"(x));
|
||||
return result;
|
||||
}
|
||||
#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__)
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
__asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0": "=d"(x): "0"(x):"cc");
|
||||
return x;
|
||||
}
|
||||
#else
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
return SDL_static_cast(Uint32, ((x << 24) | ((x << 8) & 0x00FF0000) |
|
||||
((x >> 8) & 0x0000FF00) | (x >> 24)));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
SDL_FORCE_INLINE Uint64
|
||||
SDL_Swap64(Uint64 x)
|
||||
{
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
Uint32 a, b;
|
||||
} s;
|
||||
Uint64 u;
|
||||
} v;
|
||||
v.u = x;
|
||||
__asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1": "=r"(v.s.a), "=r"(v.s.b):"0"(v.s.a),
|
||||
"1"(v.s.
|
||||
b));
|
||||
return v.u;
|
||||
}
|
||||
#elif defined(__GNUC__) && defined(__x86_64__)
|
||||
SDL_FORCE_INLINE Uint64
|
||||
SDL_Swap64(Uint64 x)
|
||||
{
|
||||
__asm__("bswapq %0": "=r"(x):"0"(x));
|
||||
return x;
|
||||
}
|
||||
#else
|
||||
SDL_FORCE_INLINE Uint64
|
||||
SDL_Swap64(Uint64 x)
|
||||
{
|
||||
Uint32 hi, lo;
|
||||
|
||||
/* Separate into high and low 32-bit values and swap them */
|
||||
lo = SDL_static_cast(Uint32, x & 0xFFFFFFFF);
|
||||
x >>= 32;
|
||||
hi = SDL_static_cast(Uint32, x & 0xFFFFFFFF);
|
||||
x = SDL_Swap32(lo);
|
||||
x <<= 32;
|
||||
x |= SDL_Swap32(hi);
|
||||
return (x);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
SDL_FORCE_INLINE float
|
||||
SDL_SwapFloat(float x)
|
||||
{
|
||||
union
|
||||
{
|
||||
float f;
|
||||
Uint32 ui32;
|
||||
} swapper;
|
||||
swapper.f = x;
|
||||
swapper.ui32 = SDL_Swap32(swapper.ui32);
|
||||
return swapper.f;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \name Swap to native
|
||||
* Byteswap item from the specified endianness to the native endianness.
|
||||
*/
|
||||
/* @{ */
|
||||
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
|
||||
#define SDL_SwapLE16(X) (X)
|
||||
#define SDL_SwapLE32(X) (X)
|
||||
#define SDL_SwapLE64(X) (X)
|
||||
#define SDL_SwapFloatLE(X) (X)
|
||||
#define SDL_SwapBE16(X) SDL_Swap16(X)
|
||||
#define SDL_SwapBE32(X) SDL_Swap32(X)
|
||||
#define SDL_SwapBE64(X) SDL_Swap64(X)
|
||||
#define SDL_SwapFloatBE(X) SDL_SwapFloat(X)
|
||||
#else
|
||||
#define SDL_SwapLE16(X) SDL_Swap16(X)
|
||||
#define SDL_SwapLE32(X) SDL_Swap32(X)
|
||||
#define SDL_SwapLE64(X) SDL_Swap64(X)
|
||||
#define SDL_SwapFloatLE(X) SDL_SwapFloat(X)
|
||||
#define SDL_SwapBE16(X) (X)
|
||||
#define SDL_SwapBE32(X) (X)
|
||||
#define SDL_SwapBE64(X) (X)
|
||||
#define SDL_SwapFloatBE(X) (X)
|
||||
#endif
|
||||
/* @} *//* Swap to native */
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_endian_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_error.h
|
||||
*
|
||||
* Simple error message routines for SDL.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_error_h
|
||||
#define _SDL_error_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Public functions */
|
||||
/* SDL_SetError() unconditionally returns -1. */
|
||||
extern DECLSPEC int SDLCALL SDL_SetError(const char *fmt, ...);
|
||||
extern DECLSPEC const char *SDLCALL SDL_GetError(void);
|
||||
extern DECLSPEC void SDLCALL SDL_ClearError(void);
|
||||
|
||||
/**
|
||||
* \name Internal error functions
|
||||
*
|
||||
* \internal
|
||||
* Private error reporting function - used internally.
|
||||
*/
|
||||
/* @{ */
|
||||
#define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM)
|
||||
#define SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED)
|
||||
#define SDL_InvalidParamError(param) SDL_SetError("Parameter '%s' is invalid", (param))
|
||||
typedef enum
|
||||
{
|
||||
SDL_ENOMEM,
|
||||
SDL_EFREAD,
|
||||
SDL_EFWRITE,
|
||||
SDL_EFSEEK,
|
||||
SDL_UNSUPPORTED,
|
||||
SDL_LASTERROR
|
||||
} SDL_errorcode;
|
||||
/* SDL_Error() unconditionally returns -1. */
|
||||
extern DECLSPEC int SDLCALL SDL_Error(SDL_errorcode code);
|
||||
/* @} *//* Internal error functions */
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_error_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,723 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_events.h
|
||||
*
|
||||
* Include file for SDL event handling.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_events_h
|
||||
#define _SDL_events_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_video.h"
|
||||
#include "SDL_keyboard.h"
|
||||
#include "SDL_mouse.h"
|
||||
#include "SDL_joystick.h"
|
||||
#include "SDL_gamecontroller.h"
|
||||
#include "SDL_quit.h"
|
||||
#include "SDL_gesture.h"
|
||||
#include "SDL_touch.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* General keyboard/mouse state definitions */
|
||||
#define SDL_RELEASED 0
|
||||
#define SDL_PRESSED 1
|
||||
|
||||
/**
|
||||
* \brief The types of events that can be delivered.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_FIRSTEVENT = 0, /**< Unused (do not remove) */
|
||||
|
||||
/* Application events */
|
||||
SDL_QUIT = 0x100, /**< User-requested quit */
|
||||
|
||||
/* These application events have special meaning on iOS, see README-ios.txt for details */
|
||||
SDL_APP_TERMINATING, /**< The application is being terminated by the OS
|
||||
Called on iOS in applicationWillTerminate()
|
||||
Called on Android in onDestroy()
|
||||
*/
|
||||
SDL_APP_LOWMEMORY, /**< The application is low on memory, free memory if possible.
|
||||
Called on iOS in applicationDidReceiveMemoryWarning()
|
||||
Called on Android in onLowMemory()
|
||||
*/
|
||||
SDL_APP_WILLENTERBACKGROUND, /**< The application is about to enter the background
|
||||
Called on iOS in applicationWillResignActive()
|
||||
Called on Android in onPause()
|
||||
*/
|
||||
SDL_APP_DIDENTERBACKGROUND, /**< The application did enter the background and may not get CPU for some time
|
||||
Called on iOS in applicationDidEnterBackground()
|
||||
Called on Android in onPause()
|
||||
*/
|
||||
SDL_APP_WILLENTERFOREGROUND, /**< The application is about to enter the foreground
|
||||
Called on iOS in applicationWillEnterForeground()
|
||||
Called on Android in onResume()
|
||||
*/
|
||||
SDL_APP_DIDENTERFOREGROUND, /**< The application is now interactive
|
||||
Called on iOS in applicationDidBecomeActive()
|
||||
Called on Android in onResume()
|
||||
*/
|
||||
|
||||
/* Window events */
|
||||
SDL_WINDOWEVENT = 0x200, /**< Window state change */
|
||||
SDL_SYSWMEVENT, /**< System specific event */
|
||||
|
||||
/* Keyboard events */
|
||||
SDL_KEYDOWN = 0x300, /**< Key pressed */
|
||||
SDL_KEYUP, /**< Key released */
|
||||
SDL_TEXTEDITING, /**< Keyboard text editing (composition) */
|
||||
SDL_TEXTINPUT, /**< Keyboard text input */
|
||||
|
||||
/* Mouse events */
|
||||
SDL_MOUSEMOTION = 0x400, /**< Mouse moved */
|
||||
SDL_MOUSEBUTTONDOWN, /**< Mouse button pressed */
|
||||
SDL_MOUSEBUTTONUP, /**< Mouse button released */
|
||||
SDL_MOUSEWHEEL, /**< Mouse wheel motion */
|
||||
|
||||
/* Joystick events */
|
||||
SDL_JOYAXISMOTION = 0x600, /**< Joystick axis motion */
|
||||
SDL_JOYBALLMOTION, /**< Joystick trackball motion */
|
||||
SDL_JOYHATMOTION, /**< Joystick hat position change */
|
||||
SDL_JOYBUTTONDOWN, /**< Joystick button pressed */
|
||||
SDL_JOYBUTTONUP, /**< Joystick button released */
|
||||
SDL_JOYDEVICEADDED, /**< A new joystick has been inserted into the system */
|
||||
SDL_JOYDEVICEREMOVED, /**< An opened joystick has been removed */
|
||||
|
||||
/* Game controller events */
|
||||
SDL_CONTROLLERAXISMOTION = 0x650, /**< Game controller axis motion */
|
||||
SDL_CONTROLLERBUTTONDOWN, /**< Game controller button pressed */
|
||||
SDL_CONTROLLERBUTTONUP, /**< Game controller button released */
|
||||
SDL_CONTROLLERDEVICEADDED, /**< A new Game controller has been inserted into the system */
|
||||
SDL_CONTROLLERDEVICEREMOVED, /**< An opened Game controller has been removed */
|
||||
SDL_CONTROLLERDEVICEREMAPPED, /**< The controller mapping was updated */
|
||||
|
||||
/* Touch events */
|
||||
SDL_FINGERDOWN = 0x700,
|
||||
SDL_FINGERUP,
|
||||
SDL_FINGERMOTION,
|
||||
|
||||
/* Gesture events */
|
||||
SDL_DOLLARGESTURE = 0x800,
|
||||
SDL_DOLLARRECORD,
|
||||
SDL_MULTIGESTURE,
|
||||
|
||||
/* Clipboard events */
|
||||
SDL_CLIPBOARDUPDATE = 0x900, /**< The clipboard changed */
|
||||
|
||||
/* Drag and drop events */
|
||||
SDL_DROPFILE = 0x1000, /**< The system requests a file open */
|
||||
|
||||
/* Render events */
|
||||
SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset */
|
||||
|
||||
/** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use,
|
||||
* and should be allocated with SDL_RegisterEvents()
|
||||
*/
|
||||
SDL_USEREVENT = 0x8000,
|
||||
|
||||
/**
|
||||
* This last event is only for bounding internal arrays
|
||||
*/
|
||||
SDL_LASTEVENT = 0xFFFF
|
||||
} SDL_EventType;
|
||||
|
||||
/**
|
||||
* \brief Fields shared by every event
|
||||
*/
|
||||
typedef struct SDL_CommonEvent
|
||||
{
|
||||
Uint32 type;
|
||||
Uint32 timestamp;
|
||||
} SDL_CommonEvent;
|
||||
|
||||
/**
|
||||
* \brief Window state change event data (event.window.*)
|
||||
*/
|
||||
typedef struct SDL_WindowEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_WINDOWEVENT */
|
||||
Uint32 timestamp;
|
||||
Uint32 windowID; /**< The associated window */
|
||||
Uint8 event; /**< ::SDL_WindowEventID */
|
||||
Uint8 padding1;
|
||||
Uint8 padding2;
|
||||
Uint8 padding3;
|
||||
Sint32 data1; /**< event dependent data */
|
||||
Sint32 data2; /**< event dependent data */
|
||||
} SDL_WindowEvent;
|
||||
|
||||
/**
|
||||
* \brief Keyboard button event structure (event.key.*)
|
||||
*/
|
||||
typedef struct SDL_KeyboardEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_KEYDOWN or ::SDL_KEYUP */
|
||||
Uint32 timestamp;
|
||||
Uint32 windowID; /**< The window with keyboard focus, if any */
|
||||
Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
|
||||
Uint8 repeat; /**< Non-zero if this is a key repeat */
|
||||
Uint8 padding2;
|
||||
Uint8 padding3;
|
||||
SDL_Keysym keysym; /**< The key that was pressed or released */
|
||||
} SDL_KeyboardEvent;
|
||||
|
||||
#define SDL_TEXTEDITINGEVENT_TEXT_SIZE (32)
|
||||
/**
|
||||
* \brief Keyboard text editing event structure (event.edit.*)
|
||||
*/
|
||||
typedef struct SDL_TextEditingEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_TEXTEDITING */
|
||||
Uint32 timestamp;
|
||||
Uint32 windowID; /**< The window with keyboard focus, if any */
|
||||
char text[SDL_TEXTEDITINGEVENT_TEXT_SIZE]; /**< The editing text */
|
||||
Sint32 start; /**< The start cursor of selected editing text */
|
||||
Sint32 length; /**< The length of selected editing text */
|
||||
} SDL_TextEditingEvent;
|
||||
|
||||
|
||||
#define SDL_TEXTINPUTEVENT_TEXT_SIZE (32)
|
||||
/**
|
||||
* \brief Keyboard text input event structure (event.text.*)
|
||||
*/
|
||||
typedef struct SDL_TextInputEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_TEXTINPUT */
|
||||
Uint32 timestamp;
|
||||
Uint32 windowID; /**< The window with keyboard focus, if any */
|
||||
char text[SDL_TEXTINPUTEVENT_TEXT_SIZE]; /**< The input text */
|
||||
} SDL_TextInputEvent;
|
||||
|
||||
/**
|
||||
* \brief Mouse motion event structure (event.motion.*)
|
||||
*/
|
||||
typedef struct SDL_MouseMotionEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_MOUSEMOTION */
|
||||
Uint32 timestamp;
|
||||
Uint32 windowID; /**< The window with mouse focus, if any */
|
||||
Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
|
||||
Uint32 state; /**< The current button state */
|
||||
Sint32 x; /**< X coordinate, relative to window */
|
||||
Sint32 y; /**< Y coordinate, relative to window */
|
||||
Sint32 xrel; /**< The relative motion in the X direction */
|
||||
Sint32 yrel; /**< The relative motion in the Y direction */
|
||||
} SDL_MouseMotionEvent;
|
||||
|
||||
/**
|
||||
* \brief Mouse button event structure (event.button.*)
|
||||
*/
|
||||
typedef struct SDL_MouseButtonEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_MOUSEBUTTONDOWN or ::SDL_MOUSEBUTTONUP */
|
||||
Uint32 timestamp;
|
||||
Uint32 windowID; /**< The window with mouse focus, if any */
|
||||
Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
|
||||
Uint8 button; /**< The mouse button index */
|
||||
Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
|
||||
Uint8 clicks; /**< 1 for single-click, 2 for double-click, etc. */
|
||||
Uint8 padding1;
|
||||
Sint32 x; /**< X coordinate, relative to window */
|
||||
Sint32 y; /**< Y coordinate, relative to window */
|
||||
} SDL_MouseButtonEvent;
|
||||
|
||||
/**
|
||||
* \brief Mouse wheel event structure (event.wheel.*)
|
||||
*/
|
||||
typedef struct SDL_MouseWheelEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_MOUSEWHEEL */
|
||||
Uint32 timestamp;
|
||||
Uint32 windowID; /**< The window with mouse focus, if any */
|
||||
Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
|
||||
Sint32 x; /**< The amount scrolled horizontally, positive to the right and negative to the left */
|
||||
Sint32 y; /**< The amount scrolled vertically, positive away from the user and negative toward the user */
|
||||
} SDL_MouseWheelEvent;
|
||||
|
||||
/**
|
||||
* \brief Joystick axis motion event structure (event.jaxis.*)
|
||||
*/
|
||||
typedef struct SDL_JoyAxisEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_JOYAXISMOTION */
|
||||
Uint32 timestamp;
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Uint8 axis; /**< The joystick axis index */
|
||||
Uint8 padding1;
|
||||
Uint8 padding2;
|
||||
Uint8 padding3;
|
||||
Sint16 value; /**< The axis value (range: -32768 to 32767) */
|
||||
Uint16 padding4;
|
||||
} SDL_JoyAxisEvent;
|
||||
|
||||
/**
|
||||
* \brief Joystick trackball motion event structure (event.jball.*)
|
||||
*/
|
||||
typedef struct SDL_JoyBallEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_JOYBALLMOTION */
|
||||
Uint32 timestamp;
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Uint8 ball; /**< The joystick trackball index */
|
||||
Uint8 padding1;
|
||||
Uint8 padding2;
|
||||
Uint8 padding3;
|
||||
Sint16 xrel; /**< The relative motion in the X direction */
|
||||
Sint16 yrel; /**< The relative motion in the Y direction */
|
||||
} SDL_JoyBallEvent;
|
||||
|
||||
/**
|
||||
* \brief Joystick hat position change event structure (event.jhat.*)
|
||||
*/
|
||||
typedef struct SDL_JoyHatEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_JOYHATMOTION */
|
||||
Uint32 timestamp;
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Uint8 hat; /**< The joystick hat index */
|
||||
Uint8 value; /**< The hat position value.
|
||||
* \sa ::SDL_HAT_LEFTUP ::SDL_HAT_UP ::SDL_HAT_RIGHTUP
|
||||
* \sa ::SDL_HAT_LEFT ::SDL_HAT_CENTERED ::SDL_HAT_RIGHT
|
||||
* \sa ::SDL_HAT_LEFTDOWN ::SDL_HAT_DOWN ::SDL_HAT_RIGHTDOWN
|
||||
*
|
||||
* Note that zero means the POV is centered.
|
||||
*/
|
||||
Uint8 padding1;
|
||||
Uint8 padding2;
|
||||
} SDL_JoyHatEvent;
|
||||
|
||||
/**
|
||||
* \brief Joystick button event structure (event.jbutton.*)
|
||||
*/
|
||||
typedef struct SDL_JoyButtonEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_JOYBUTTONDOWN or ::SDL_JOYBUTTONUP */
|
||||
Uint32 timestamp;
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Uint8 button; /**< The joystick button index */
|
||||
Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
|
||||
Uint8 padding1;
|
||||
Uint8 padding2;
|
||||
} SDL_JoyButtonEvent;
|
||||
|
||||
/**
|
||||
* \brief Joystick device event structure (event.jdevice.*)
|
||||
*/
|
||||
typedef struct SDL_JoyDeviceEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_JOYDEVICEADDED or ::SDL_JOYDEVICEREMOVED */
|
||||
Uint32 timestamp;
|
||||
Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED event */
|
||||
} SDL_JoyDeviceEvent;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Game controller axis motion event structure (event.caxis.*)
|
||||
*/
|
||||
typedef struct SDL_ControllerAxisEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_CONTROLLERAXISMOTION */
|
||||
Uint32 timestamp;
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Uint8 axis; /**< The controller axis (SDL_GameControllerAxis) */
|
||||
Uint8 padding1;
|
||||
Uint8 padding2;
|
||||
Uint8 padding3;
|
||||
Sint16 value; /**< The axis value (range: -32768 to 32767) */
|
||||
Uint16 padding4;
|
||||
} SDL_ControllerAxisEvent;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Game controller button event structure (event.cbutton.*)
|
||||
*/
|
||||
typedef struct SDL_ControllerButtonEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_CONTROLLERBUTTONDOWN or ::SDL_CONTROLLERBUTTONUP */
|
||||
Uint32 timestamp;
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Uint8 button; /**< The controller button (SDL_GameControllerButton) */
|
||||
Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
|
||||
Uint8 padding1;
|
||||
Uint8 padding2;
|
||||
} SDL_ControllerButtonEvent;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Controller device event structure (event.cdevice.*)
|
||||
*/
|
||||
typedef struct SDL_ControllerDeviceEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_CONTROLLERDEVICEADDED, ::SDL_CONTROLLERDEVICEREMOVED, or ::SDL_CONTROLLERDEVICEREMAPPED */
|
||||
Uint32 timestamp;
|
||||
Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED or REMAPPED event */
|
||||
} SDL_ControllerDeviceEvent;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Touch finger event structure (event.tfinger.*)
|
||||
*/
|
||||
typedef struct SDL_TouchFingerEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_FINGERMOTION or ::SDL_FINGERDOWN or ::SDL_FINGERUP */
|
||||
Uint32 timestamp;
|
||||
SDL_TouchID touchId; /**< The touch device id */
|
||||
SDL_FingerID fingerId;
|
||||
float x; /**< Normalized in the range 0...1 */
|
||||
float y; /**< Normalized in the range 0...1 */
|
||||
float dx; /**< Normalized in the range 0...1 */
|
||||
float dy; /**< Normalized in the range 0...1 */
|
||||
float pressure; /**< Normalized in the range 0...1 */
|
||||
} SDL_TouchFingerEvent;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Multiple Finger Gesture Event (event.mgesture.*)
|
||||
*/
|
||||
typedef struct SDL_MultiGestureEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_MULTIGESTURE */
|
||||
Uint32 timestamp;
|
||||
SDL_TouchID touchId; /**< The touch device index */
|
||||
float dTheta;
|
||||
float dDist;
|
||||
float x;
|
||||
float y;
|
||||
Uint16 numFingers;
|
||||
Uint16 padding;
|
||||
} SDL_MultiGestureEvent;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Dollar Gesture Event (event.dgesture.*)
|
||||
*/
|
||||
typedef struct SDL_DollarGestureEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_DOLLARGESTURE */
|
||||
Uint32 timestamp;
|
||||
SDL_TouchID touchId; /**< The touch device id */
|
||||
SDL_GestureID gestureId;
|
||||
Uint32 numFingers;
|
||||
float error;
|
||||
float x; /**< Normalized center of gesture */
|
||||
float y; /**< Normalized center of gesture */
|
||||
} SDL_DollarGestureEvent;
|
||||
|
||||
|
||||
/**
|
||||
* \brief An event used to request a file open by the system (event.drop.*)
|
||||
* This event is disabled by default, you can enable it with SDL_EventState()
|
||||
* \note If you enable this event, you must free the filename in the event.
|
||||
*/
|
||||
typedef struct SDL_DropEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_DROPFILE */
|
||||
Uint32 timestamp;
|
||||
char *file; /**< The file name, which should be freed with SDL_free() */
|
||||
} SDL_DropEvent;
|
||||
|
||||
|
||||
/**
|
||||
* \brief The "quit requested" event
|
||||
*/
|
||||
typedef struct SDL_QuitEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_QUIT */
|
||||
Uint32 timestamp;
|
||||
} SDL_QuitEvent;
|
||||
|
||||
/**
|
||||
* \brief OS Specific event
|
||||
*/
|
||||
typedef struct SDL_OSEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_QUIT */
|
||||
Uint32 timestamp;
|
||||
} SDL_OSEvent;
|
||||
|
||||
/**
|
||||
* \brief A user-defined event type (event.user.*)
|
||||
*/
|
||||
typedef struct SDL_UserEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_USEREVENT through ::SDL_LASTEVENT-1 */
|
||||
Uint32 timestamp;
|
||||
Uint32 windowID; /**< The associated window if any */
|
||||
Sint32 code; /**< User defined event code */
|
||||
void *data1; /**< User defined data pointer */
|
||||
void *data2; /**< User defined data pointer */
|
||||
} SDL_UserEvent;
|
||||
|
||||
|
||||
struct SDL_SysWMmsg;
|
||||
typedef struct SDL_SysWMmsg SDL_SysWMmsg;
|
||||
|
||||
/**
|
||||
* \brief A video driver dependent system event (event.syswm.*)
|
||||
* This event is disabled by default, you can enable it with SDL_EventState()
|
||||
*
|
||||
* \note If you want to use this event, you should include SDL_syswm.h.
|
||||
*/
|
||||
typedef struct SDL_SysWMEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_SYSWMEVENT */
|
||||
Uint32 timestamp;
|
||||
SDL_SysWMmsg *msg; /**< driver dependent data, defined in SDL_syswm.h */
|
||||
} SDL_SysWMEvent;
|
||||
|
||||
/**
|
||||
* \brief General event structure
|
||||
*/
|
||||
typedef union SDL_Event
|
||||
{
|
||||
Uint32 type; /**< Event type, shared with all events */
|
||||
SDL_CommonEvent common; /**< Common event data */
|
||||
SDL_WindowEvent window; /**< Window event data */
|
||||
SDL_KeyboardEvent key; /**< Keyboard event data */
|
||||
SDL_TextEditingEvent edit; /**< Text editing event data */
|
||||
SDL_TextInputEvent text; /**< Text input event data */
|
||||
SDL_MouseMotionEvent motion; /**< Mouse motion event data */
|
||||
SDL_MouseButtonEvent button; /**< Mouse button event data */
|
||||
SDL_MouseWheelEvent wheel; /**< Mouse wheel event data */
|
||||
SDL_JoyAxisEvent jaxis; /**< Joystick axis event data */
|
||||
SDL_JoyBallEvent jball; /**< Joystick ball event data */
|
||||
SDL_JoyHatEvent jhat; /**< Joystick hat event data */
|
||||
SDL_JoyButtonEvent jbutton; /**< Joystick button event data */
|
||||
SDL_JoyDeviceEvent jdevice; /**< Joystick device change event data */
|
||||
SDL_ControllerAxisEvent caxis; /**< Game Controller axis event data */
|
||||
SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */
|
||||
SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */
|
||||
SDL_QuitEvent quit; /**< Quit request event data */
|
||||
SDL_UserEvent user; /**< Custom event data */
|
||||
SDL_SysWMEvent syswm; /**< System dependent window event data */
|
||||
SDL_TouchFingerEvent tfinger; /**< Touch finger event data */
|
||||
SDL_MultiGestureEvent mgesture; /**< Gesture event data */
|
||||
SDL_DollarGestureEvent dgesture; /**< Gesture event data */
|
||||
SDL_DropEvent drop; /**< Drag and drop event data */
|
||||
|
||||
/* This is necessary for ABI compatibility between Visual C++ and GCC
|
||||
Visual C++ will respect the push pack pragma and use 52 bytes for
|
||||
this structure, and GCC will use the alignment of the largest datatype
|
||||
within the union, which is 8 bytes.
|
||||
|
||||
So... we'll add padding to force the size to be 56 bytes for both.
|
||||
*/
|
||||
Uint8 padding[56];
|
||||
} SDL_Event;
|
||||
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/**
|
||||
* Pumps the event loop, gathering events from the input devices.
|
||||
*
|
||||
* This function updates the event queue and internal input device state.
|
||||
*
|
||||
* This should only be run in the thread that sets the video mode.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_PumpEvents(void);
|
||||
|
||||
/* @{ */
|
||||
typedef enum
|
||||
{
|
||||
SDL_ADDEVENT,
|
||||
SDL_PEEKEVENT,
|
||||
SDL_GETEVENT
|
||||
} SDL_eventaction;
|
||||
|
||||
/**
|
||||
* Checks the event queue for messages and optionally returns them.
|
||||
*
|
||||
* If \c action is ::SDL_ADDEVENT, up to \c numevents events will be added to
|
||||
* the back of the event queue.
|
||||
*
|
||||
* If \c action is ::SDL_PEEKEVENT, up to \c numevents events at the front
|
||||
* of the event queue, within the specified minimum and maximum type,
|
||||
* will be returned and will not be removed from the queue.
|
||||
*
|
||||
* If \c action is ::SDL_GETEVENT, up to \c numevents events at the front
|
||||
* of the event queue, within the specified minimum and maximum type,
|
||||
* will be returned and will be removed from the queue.
|
||||
*
|
||||
* \return The number of events actually stored, or -1 if there was an error.
|
||||
*
|
||||
* This function is thread-safe.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event * events, int numevents,
|
||||
SDL_eventaction action,
|
||||
Uint32 minType, Uint32 maxType);
|
||||
/* @} */
|
||||
|
||||
/**
|
||||
* Checks to see if certain event types are in the event queue.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasEvent(Uint32 type);
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType);
|
||||
|
||||
/**
|
||||
* This function clears events from the event queue
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type);
|
||||
extern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType);
|
||||
|
||||
/**
|
||||
* \brief Polls for currently pending events.
|
||||
*
|
||||
* \return 1 if there are any pending events, or 0 if there are none available.
|
||||
*
|
||||
* \param event If not NULL, the next event is removed from the queue and
|
||||
* stored in that area.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event * event);
|
||||
|
||||
/**
|
||||
* \brief Waits indefinitely for the next available event.
|
||||
*
|
||||
* \return 1, or 0 if there was an error while waiting for events.
|
||||
*
|
||||
* \param event If not NULL, the next event is removed from the queue and
|
||||
* stored in that area.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event * event);
|
||||
|
||||
/**
|
||||
* \brief Waits until the specified timeout (in milliseconds) for the next
|
||||
* available event.
|
||||
*
|
||||
* \return 1, or 0 if there was an error while waiting for events.
|
||||
*
|
||||
* \param event If not NULL, the next event is removed from the queue and
|
||||
* stored in that area.
|
||||
* \param timeout The timeout (in milliseconds) to wait for next event.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_WaitEventTimeout(SDL_Event * event,
|
||||
int timeout);
|
||||
|
||||
/**
|
||||
* \brief Add an event to the event queue.
|
||||
*
|
||||
* \return 1 on success, 0 if the event was filtered, or -1 if the event queue
|
||||
* was full or there was some other error.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_PushEvent(SDL_Event * event);
|
||||
|
||||
typedef int (SDLCALL * SDL_EventFilter) (void *userdata, SDL_Event * event);
|
||||
|
||||
/**
|
||||
* Sets up a filter to process all events before they change internal state and
|
||||
* are posted to the internal event queue.
|
||||
*
|
||||
* The filter is prototyped as:
|
||||
* \code
|
||||
* int SDL_EventFilter(void *userdata, SDL_Event * event);
|
||||
* \endcode
|
||||
*
|
||||
* If the filter returns 1, then the event will be added to the internal queue.
|
||||
* If it returns 0, then the event will be dropped from the queue, but the
|
||||
* internal state will still be updated. This allows selective filtering of
|
||||
* dynamically arriving events.
|
||||
*
|
||||
* \warning Be very careful of what you do in the event filter function, as
|
||||
* it may run in a different thread!
|
||||
*
|
||||
* There is one caveat when dealing with the ::SDL_QuitEvent event type. The
|
||||
* event filter is only called when the window manager desires to close the
|
||||
* application window. If the event filter returns 1, then the window will
|
||||
* be closed, otherwise the window will remain open if possible.
|
||||
*
|
||||
* If the quit event is generated by an interrupt signal, it will bypass the
|
||||
* internal queue and be delivered to the application at the next event poll.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter,
|
||||
void *userdata);
|
||||
|
||||
/**
|
||||
* Return the current event filter - can be used to "chain" filters.
|
||||
* If there is no event filter set, this function returns SDL_FALSE.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter * filter,
|
||||
void **userdata);
|
||||
|
||||
/**
|
||||
* Add a function which is called when an event is added to the queue.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_AddEventWatch(SDL_EventFilter filter,
|
||||
void *userdata);
|
||||
|
||||
/**
|
||||
* Remove an event watch function added with SDL_AddEventWatch()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_DelEventWatch(SDL_EventFilter filter,
|
||||
void *userdata);
|
||||
|
||||
/**
|
||||
* Run the filter function on the current event queue, removing any
|
||||
* events for which the filter returns 0.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter,
|
||||
void *userdata);
|
||||
|
||||
/* @{ */
|
||||
#define SDL_QUERY -1
|
||||
#define SDL_IGNORE 0
|
||||
#define SDL_DISABLE 0
|
||||
#define SDL_ENABLE 1
|
||||
|
||||
/**
|
||||
* This function allows you to set the state of processing certain events.
|
||||
* - If \c state is set to ::SDL_IGNORE, that event will be automatically
|
||||
* dropped from the event queue and will not event be filtered.
|
||||
* - If \c state is set to ::SDL_ENABLE, that event will be processed
|
||||
* normally.
|
||||
* - If \c state is set to ::SDL_QUERY, SDL_EventState() will return the
|
||||
* current processing state of the specified event.
|
||||
*/
|
||||
extern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint32 type, int state);
|
||||
/* @} */
|
||||
#define SDL_GetEventState(type) SDL_EventState(type, SDL_QUERY)
|
||||
|
||||
/**
|
||||
* This function allocates a set of user-defined events, and returns
|
||||
* the beginning event number for that set of events.
|
||||
*
|
||||
* If there aren't enough user-defined events left, this function
|
||||
* returns (Uint32)-1
|
||||
*/
|
||||
extern DECLSPEC Uint32 SDLCALL SDL_RegisterEvents(int numevents);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_events_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,136 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_filesystem.h
|
||||
*
|
||||
* \brief Include file for filesystem SDL API functions
|
||||
*/
|
||||
|
||||
#ifndef _SDL_filesystem_h
|
||||
#define _SDL_filesystem_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Get the path where the application resides.
|
||||
*
|
||||
* Get the "base path". This is the directory where the application was run
|
||||
* from, which is probably the installation directory, and may or may not
|
||||
* be the process's current working directory.
|
||||
*
|
||||
* This returns an absolute path in UTF-8 encoding, and is guaranteed to
|
||||
* end with a path separator ('\\' on Windows, '/' most other places).
|
||||
*
|
||||
* The pointer returned by this function is owned by you. Please call
|
||||
* SDL_free() on the pointer when you are done with it, or it will be a
|
||||
* memory leak. This is not necessarily a fast call, though, so you should
|
||||
* call this once near startup and save the string if you need it.
|
||||
*
|
||||
* Some platforms can't determine the application's path, and on other
|
||||
* platforms, this might be meaningless. In such cases, this function will
|
||||
* return NULL.
|
||||
*
|
||||
* \return String of base dir in UTF-8 encoding, or NULL on error.
|
||||
*
|
||||
* \sa SDL_GetPrefPath
|
||||
*/
|
||||
extern DECLSPEC char *SDLCALL SDL_GetBasePath(void);
|
||||
|
||||
/**
|
||||
* \brief Get the user-and-app-specific path where files can be written.
|
||||
*
|
||||
* Get the "pref dir". This is meant to be where users can write personal
|
||||
* files (preferences and save games, etc) that are specific to your
|
||||
* application. This directory is unique per user, per application.
|
||||
*
|
||||
* This function will decide the appropriate location in the native filesystem,
|
||||
* create the directory if necessary, and return a string of the absolute
|
||||
* path to the directory in UTF-8 encoding.
|
||||
*
|
||||
* On Windows, the string might look like:
|
||||
* "C:\\Users\\bob\\AppData\\Roaming\\My Company\\My Program Name\\"
|
||||
*
|
||||
* On Linux, the string might look like:
|
||||
* "/home/bob/.local/share/My Program Name/"
|
||||
*
|
||||
* On Mac OS X, the string might look like:
|
||||
* "/Users/bob/Library/Application Support/My Program Name/"
|
||||
*
|
||||
* (etc.)
|
||||
*
|
||||
* You specify the name of your organization (if it's not a real organization,
|
||||
* your name or an Internet domain you own might do) and the name of your
|
||||
* application. These should be untranslated proper names.
|
||||
*
|
||||
* Both the org and app strings may become part of a directory name, so
|
||||
* please follow these rules:
|
||||
*
|
||||
* - Try to use the same org string (including case-sensitivity) for
|
||||
* all your applications that use this function.
|
||||
* - Always use a unique app string for each one, and make sure it never
|
||||
* changes for an app once you've decided on it.
|
||||
* - Unicode characters are legal, as long as it's UTF-8 encoded, but...
|
||||
* - ...only use letters, numbers, and spaces. Avoid punctuation like
|
||||
* "Game Name 2: Bad Guy's Revenge!" ... "Game Name 2" is sufficient.
|
||||
*
|
||||
* This returns an absolute path in UTF-8 encoding, and is guaranteed to
|
||||
* end with a path separator ('\\' on Windows, '/' most other places).
|
||||
*
|
||||
* The pointer returned by this function is owned by you. Please call
|
||||
* SDL_free() on the pointer when you are done with it, or it will be a
|
||||
* memory leak. This is not necessarily a fast call, though, so you should
|
||||
* call this once near startup and save the string if you need it.
|
||||
*
|
||||
* You should assume the path returned by this function is the only safe
|
||||
* place to write files (and that SDL_GetBasePath(), while it might be
|
||||
* writable, or even the parent of the returned path, aren't where you
|
||||
* should be writing things).
|
||||
*
|
||||
* Some platforms can't determine the pref path, and on other
|
||||
* platforms, this might be meaningless. In such cases, this function will
|
||||
* return NULL.
|
||||
*
|
||||
* \param org The name of your organization.
|
||||
* \param app The name of your application.
|
||||
* \return UTF-8 string of user dir in platform-dependent notation. NULL
|
||||
* if there's a problem (creating directory failed, etc).
|
||||
*
|
||||
* \sa SDL_GetBasePath
|
||||
*/
|
||||
extern DECLSPEC char *SDLCALL SDL_GetPrefPath(const char *org, const char *app);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_system_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,316 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_gamecontroller.h
|
||||
*
|
||||
* Include file for SDL game controller event handling
|
||||
*/
|
||||
|
||||
#ifndef _SDL_gamecontroller_h
|
||||
#define _SDL_gamecontroller_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_rwops.h"
|
||||
#include "SDL_joystick.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \file SDL_gamecontroller.h
|
||||
*
|
||||
* In order to use these functions, SDL_Init() must have been called
|
||||
* with the ::SDL_INIT_JOYSTICK flag. This causes SDL to scan the system
|
||||
* for game controllers, and load appropriate drivers.
|
||||
*
|
||||
* If you would like to receive controller updates while the application
|
||||
* is in the background, you should set the following hint before calling
|
||||
* SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
|
||||
*/
|
||||
|
||||
/* The gamecontroller structure used to identify an SDL game controller */
|
||||
struct _SDL_GameController;
|
||||
typedef struct _SDL_GameController SDL_GameController;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SDL_CONTROLLER_BINDTYPE_NONE = 0,
|
||||
SDL_CONTROLLER_BINDTYPE_BUTTON,
|
||||
SDL_CONTROLLER_BINDTYPE_AXIS,
|
||||
SDL_CONTROLLER_BINDTYPE_HAT
|
||||
} SDL_GameControllerBindType;
|
||||
|
||||
/**
|
||||
* Get the SDL joystick layer binding for this controller button/axis mapping
|
||||
*/
|
||||
typedef struct SDL_GameControllerButtonBind
|
||||
{
|
||||
SDL_GameControllerBindType bindType;
|
||||
union
|
||||
{
|
||||
int button;
|
||||
int axis;
|
||||
struct {
|
||||
int hat;
|
||||
int hat_mask;
|
||||
} hat;
|
||||
} value;
|
||||
|
||||
} SDL_GameControllerButtonBind;
|
||||
|
||||
|
||||
/**
|
||||
* To count the number of game controllers in the system for the following:
|
||||
* int nJoysticks = SDL_NumJoysticks();
|
||||
* int nGameControllers = 0;
|
||||
* for ( int i = 0; i < nJoysticks; i++ ) {
|
||||
* if ( SDL_IsGameController(i) ) {
|
||||
* nGameControllers++;
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:
|
||||
* guid,name,mappings
|
||||
*
|
||||
* Where GUID is the string value from SDL_JoystickGetGUIDString(), name is the human readable string for the device and mappings are controller mappings to joystick ones.
|
||||
* Under Windows there is a reserved GUID of "xinput" that covers any XInput devices.
|
||||
* The mapping format for joystick is:
|
||||
* bX - a joystick button, index X
|
||||
* hX.Y - hat X with value Y
|
||||
* aX - axis X of the joystick
|
||||
* Buttons can be used as a controller axis and vice versa.
|
||||
*
|
||||
* This string shows an example of a valid mapping for a controller
|
||||
* "341a3608000000000000504944564944,Afterglow PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7",
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Load a set of mappings from a seekable SDL data stream (memory or file), filtered by the current SDL_GetPlatform()
|
||||
* A community sourced database of controllers is available at https://raw.github.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt
|
||||
*
|
||||
* If \c freerw is non-zero, the stream will be closed after being read.
|
||||
*
|
||||
* \return number of mappings added, -1 on error
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW( SDL_RWops * rw, int freerw );
|
||||
|
||||
/**
|
||||
* Load a set of mappings from a file, filtered by the current SDL_GetPlatform()
|
||||
*
|
||||
* Convenience macro.
|
||||
*/
|
||||
#define SDL_GameControllerAddMappingsFromFile(file) SDL_GameControllerAddMappingsFromRW(SDL_RWFromFile(file, "rb"), 1)
|
||||
|
||||
/**
|
||||
* Add or update an existing mapping configuration
|
||||
*
|
||||
* \return 1 if mapping is added, 0 if updated, -1 on error
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerAddMapping( const char* mappingString );
|
||||
|
||||
/**
|
||||
* Get a mapping string for a GUID
|
||||
*
|
||||
* \return the mapping string. Must be freed with SDL_free. Returns NULL if no mapping is available
|
||||
*/
|
||||
extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForGUID( SDL_JoystickGUID guid );
|
||||
|
||||
/**
|
||||
* Get a mapping string for an open GameController
|
||||
*
|
||||
* \return the mapping string. Must be freed with SDL_free. Returns NULL if no mapping is available
|
||||
*/
|
||||
extern DECLSPEC char * SDLCALL SDL_GameControllerMapping( SDL_GameController * gamecontroller );
|
||||
|
||||
/**
|
||||
* Is the joystick on this index supported by the game controller interface?
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index);
|
||||
|
||||
|
||||
/**
|
||||
* Get the implementation dependent name of a game controller.
|
||||
* This can be called before any controllers are opened.
|
||||
* If no name can be found, this function returns NULL.
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index);
|
||||
|
||||
/**
|
||||
* Open a game controller for use.
|
||||
* The index passed as an argument refers to the N'th game controller on the system.
|
||||
* This index is the value which will identify this controller in future controller
|
||||
* events.
|
||||
*
|
||||
* \return A controller identifier, or NULL if an error occurred.
|
||||
*/
|
||||
extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerOpen(int joystick_index);
|
||||
|
||||
/**
|
||||
* Return the name for this currently opened controller
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Returns SDL_TRUE if the controller has been opened and currently connected,
|
||||
* or SDL_FALSE if it has not.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerGetAttached(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the underlying joystick object used by a controller
|
||||
*/
|
||||
extern DECLSPEC SDL_Joystick *SDLCALL SDL_GameControllerGetJoystick(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Enable/disable controller event polling.
|
||||
*
|
||||
* If controller events are disabled, you must call SDL_GameControllerUpdate()
|
||||
* yourself and check the state of the controller when you want controller
|
||||
* information.
|
||||
*
|
||||
* The state can be one of ::SDL_QUERY, ::SDL_ENABLE or ::SDL_IGNORE.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerEventState(int state);
|
||||
|
||||
/**
|
||||
* Update the current state of the open game controllers.
|
||||
*
|
||||
* This is called automatically by the event loop if any game controller
|
||||
* events are enabled.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GameControllerUpdate(void);
|
||||
|
||||
|
||||
/**
|
||||
* The list of axes available from a controller
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_CONTROLLER_AXIS_INVALID = -1,
|
||||
SDL_CONTROLLER_AXIS_LEFTX,
|
||||
SDL_CONTROLLER_AXIS_LEFTY,
|
||||
SDL_CONTROLLER_AXIS_RIGHTX,
|
||||
SDL_CONTROLLER_AXIS_RIGHTY,
|
||||
SDL_CONTROLLER_AXIS_TRIGGERLEFT,
|
||||
SDL_CONTROLLER_AXIS_TRIGGERRIGHT,
|
||||
SDL_CONTROLLER_AXIS_MAX
|
||||
} SDL_GameControllerAxis;
|
||||
|
||||
/**
|
||||
* turn this string into a axis mapping
|
||||
*/
|
||||
extern DECLSPEC SDL_GameControllerAxis SDLCALL SDL_GameControllerGetAxisFromString(const char *pchString);
|
||||
|
||||
/**
|
||||
* turn this axis enum into a string mapping
|
||||
*/
|
||||
extern DECLSPEC const char* SDLCALL SDL_GameControllerGetStringForAxis(SDL_GameControllerAxis axis);
|
||||
|
||||
/**
|
||||
* Get the SDL joystick layer binding for this controller button mapping
|
||||
*/
|
||||
extern DECLSPEC SDL_GameControllerButtonBind SDLCALL
|
||||
SDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller,
|
||||
SDL_GameControllerAxis axis);
|
||||
|
||||
/**
|
||||
* Get the current state of an axis control on a game controller.
|
||||
*
|
||||
* The state is a value ranging from -32768 to 32767.
|
||||
*
|
||||
* The axis indices start at index 0.
|
||||
*/
|
||||
extern DECLSPEC Sint16 SDLCALL
|
||||
SDL_GameControllerGetAxis(SDL_GameController *gamecontroller,
|
||||
SDL_GameControllerAxis axis);
|
||||
|
||||
/**
|
||||
* The list of buttons available from a controller
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_CONTROLLER_BUTTON_INVALID = -1,
|
||||
SDL_CONTROLLER_BUTTON_A,
|
||||
SDL_CONTROLLER_BUTTON_B,
|
||||
SDL_CONTROLLER_BUTTON_X,
|
||||
SDL_CONTROLLER_BUTTON_Y,
|
||||
SDL_CONTROLLER_BUTTON_BACK,
|
||||
SDL_CONTROLLER_BUTTON_GUIDE,
|
||||
SDL_CONTROLLER_BUTTON_START,
|
||||
SDL_CONTROLLER_BUTTON_LEFTSTICK,
|
||||
SDL_CONTROLLER_BUTTON_RIGHTSTICK,
|
||||
SDL_CONTROLLER_BUTTON_LEFTSHOULDER,
|
||||
SDL_CONTROLLER_BUTTON_RIGHTSHOULDER,
|
||||
SDL_CONTROLLER_BUTTON_DPAD_UP,
|
||||
SDL_CONTROLLER_BUTTON_DPAD_DOWN,
|
||||
SDL_CONTROLLER_BUTTON_DPAD_LEFT,
|
||||
SDL_CONTROLLER_BUTTON_DPAD_RIGHT,
|
||||
SDL_CONTROLLER_BUTTON_MAX
|
||||
} SDL_GameControllerButton;
|
||||
|
||||
/**
|
||||
* turn this string into a button mapping
|
||||
*/
|
||||
extern DECLSPEC SDL_GameControllerButton SDLCALL SDL_GameControllerGetButtonFromString(const char *pchString);
|
||||
|
||||
/**
|
||||
* turn this button enum into a string mapping
|
||||
*/
|
||||
extern DECLSPEC const char* SDLCALL SDL_GameControllerGetStringForButton(SDL_GameControllerButton button);
|
||||
|
||||
/**
|
||||
* Get the SDL joystick layer binding for this controller button mapping
|
||||
*/
|
||||
extern DECLSPEC SDL_GameControllerButtonBind SDLCALL
|
||||
SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller,
|
||||
SDL_GameControllerButton button);
|
||||
|
||||
|
||||
/**
|
||||
* Get the current state of a button on a game controller.
|
||||
*
|
||||
* The button indices start at index 0.
|
||||
*/
|
||||
extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *gamecontroller,
|
||||
SDL_GameControllerButton button);
|
||||
|
||||
/**
|
||||
* Close a controller previously opened with SDL_GameControllerOpen().
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GameControllerClose(SDL_GameController *gamecontroller);
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_gamecontroller_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_gesture.h
|
||||
*
|
||||
* Include file for SDL gesture event handling.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_gesture_h
|
||||
#define _SDL_gesture_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_video.h"
|
||||
|
||||
#include "SDL_touch.h"
|
||||
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef Sint64 SDL_GestureID;
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/**
|
||||
* \brief Begin Recording a gesture on the specified touch, or all touches (-1)
|
||||
*
|
||||
*
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RecordGesture(SDL_TouchID touchId);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Save all currently loaded Dollar Gesture templates
|
||||
*
|
||||
*
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SaveAllDollarTemplates(SDL_RWops *dst);
|
||||
|
||||
/**
|
||||
* \brief Save a currently loaded Dollar Gesture template
|
||||
*
|
||||
*
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SaveDollarTemplate(SDL_GestureID gestureId,SDL_RWops *dst);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Load Dollar Gesture templates from a file
|
||||
*
|
||||
*
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src);
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_gesture_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,517 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_hints.h
|
||||
*
|
||||
* Official documentation for SDL configuration variables
|
||||
*
|
||||
* This file contains functions to set and get configuration hints,
|
||||
* as well as listing each of them alphabetically.
|
||||
*
|
||||
* The convention for naming hints is SDL_HINT_X, where "SDL_X" is
|
||||
* the environment variable that can be used to override the default.
|
||||
*
|
||||
* In general these hints are just that - they may or may not be
|
||||
* supported or applicable on any given platform, but they provide
|
||||
* a way for an application or user to give the library a hint as
|
||||
* to how they would like the library to work.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_hints_h
|
||||
#define _SDL_hints_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief A variable controlling how 3D acceleration is used to accelerate the SDL screen surface.
|
||||
*
|
||||
* SDL can try to accelerate the SDL screen surface by using streaming
|
||||
* textures with a 3D rendering engine. This variable controls whether and
|
||||
* how this is done.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Disable 3D acceleration
|
||||
* "1" - Enable 3D acceleration, using the default renderer.
|
||||
* "X" - Enable 3D acceleration, using X where X is one of the valid rendering drivers. (e.g. "direct3d", "opengl", etc.)
|
||||
*
|
||||
* By default SDL tries to make a best guess for each platform whether
|
||||
* to use acceleration or not.
|
||||
*/
|
||||
#define SDL_HINT_FRAMEBUFFER_ACCELERATION "SDL_FRAMEBUFFER_ACCELERATION"
|
||||
|
||||
/**
|
||||
* \brief A variable specifying which render driver to use.
|
||||
*
|
||||
* If the application doesn't pick a specific renderer to use, this variable
|
||||
* specifies the name of the preferred renderer. If the preferred renderer
|
||||
* can't be initialized, the normal default renderer is used.
|
||||
*
|
||||
* This variable is case insensitive and can be set to the following values:
|
||||
* "direct3d"
|
||||
* "opengl"
|
||||
* "opengles2"
|
||||
* "opengles"
|
||||
* "software"
|
||||
*
|
||||
* The default varies by platform, but it's the first one in the list that
|
||||
* is available on the current platform.
|
||||
*/
|
||||
#define SDL_HINT_RENDER_DRIVER "SDL_RENDER_DRIVER"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the OpenGL render driver uses shaders if they are available.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Disable shaders
|
||||
* "1" - Enable shaders
|
||||
*
|
||||
* By default shaders are used if OpenGL supports them.
|
||||
*/
|
||||
#define SDL_HINT_RENDER_OPENGL_SHADERS "SDL_RENDER_OPENGL_SHADERS"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the Direct3D device is initialized for thread-safe operations.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Thread-safety is not enabled (faster)
|
||||
* "1" - Thread-safety is enabled
|
||||
*
|
||||
* By default the Direct3D device is created with thread-safety disabled.
|
||||
*/
|
||||
#define SDL_HINT_RENDER_DIRECT3D_THREADSAFE "SDL_RENDER_DIRECT3D_THREADSAFE"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether to enable Direct3D 11+'s Debug Layer.
|
||||
*
|
||||
* This variable does not have any effect on the Direct3D 9 based renderer.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Disable Debug Layer use
|
||||
* "1" - Enable Debug Layer use
|
||||
*
|
||||
* By default, SDL does not use Direct3D Debug Layer.
|
||||
*/
|
||||
#define SDL_HINT_RENDER_DIRECT3D11_DEBUG "SDL_HINT_RENDER_DIRECT3D11_DEBUG"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling the scaling quality
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" or "nearest" - Nearest pixel sampling
|
||||
* "1" or "linear" - Linear filtering (supported by OpenGL and Direct3D)
|
||||
* "2" or "best" - Currently this is the same as "linear"
|
||||
*
|
||||
* By default nearest pixel sampling is used
|
||||
*/
|
||||
#define SDL_HINT_RENDER_SCALE_QUALITY "SDL_RENDER_SCALE_QUALITY"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether updates to the SDL screen surface should be synchronized with the vertical refresh, to avoid tearing.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Disable vsync
|
||||
* "1" - Enable vsync
|
||||
*
|
||||
* By default SDL does not sync screen surface updates with vertical refresh.
|
||||
*/
|
||||
#define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the screensaver is enabled.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Disable screensaver
|
||||
* "1" - Enable screensaver
|
||||
*
|
||||
* By default SDL will disable the screensaver.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_ALLOW_SCREENSAVER "SDL_VIDEO_ALLOW_SCREENSAVER"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the X11 VidMode extension should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Disable XVidMode
|
||||
* "1" - Enable XVidMode
|
||||
*
|
||||
* By default SDL will use XVidMode if it is available.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_X11_XVIDMODE "SDL_VIDEO_X11_XVIDMODE"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the X11 Xinerama extension should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Disable Xinerama
|
||||
* "1" - Enable Xinerama
|
||||
*
|
||||
* By default SDL will use Xinerama if it is available.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_X11_XINERAMA "SDL_VIDEO_X11_XINERAMA"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the X11 XRandR extension should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Disable XRandR
|
||||
* "1" - Enable XRandR
|
||||
*
|
||||
* By default SDL will not use XRandR because of window manager issues.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether grabbing input grabs the keyboard
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Grab will affect only the mouse
|
||||
* "1" - Grab will affect mouse and keyboard
|
||||
*
|
||||
* By default SDL will not grab the keyboard so system shortcuts still work.
|
||||
*/
|
||||
#define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether relative mouse mode is implemented using mouse warping
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Relative mouse mode uses raw input
|
||||
* "1" - Relative mouse mode uses mouse warping
|
||||
*
|
||||
* By default SDL will use raw input for relative mouse mode
|
||||
*/
|
||||
#define SDL_HINT_MOUSE_RELATIVE_MODE_WARP "SDL_MOUSE_RELATIVE_MODE_WARP"
|
||||
|
||||
/**
|
||||
* \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true.
|
||||
*
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the idle timer is disabled on iOS.
|
||||
*
|
||||
* When an iOS app does not receive touches for some time, the screen is
|
||||
* dimmed automatically. For games where the accelerometer is the only input
|
||||
* this is problematic. This functionality can be disabled by setting this
|
||||
* hint.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Enable idle timer
|
||||
* "1" - Disable idle timer
|
||||
*/
|
||||
#define SDL_HINT_IDLE_TIMER_DISABLED "SDL_IOS_IDLE_TIMER_DISABLED"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling which orientations are allowed on iOS.
|
||||
*
|
||||
* In some circumstances it is necessary to be able to explicitly control
|
||||
* which UI orientations are allowed.
|
||||
*
|
||||
* This variable is a space delimited list of the following values:
|
||||
* "LandscapeLeft", "LandscapeRight", "Portrait" "PortraitUpsideDown"
|
||||
*/
|
||||
#define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether an Android built-in accelerometer should be
|
||||
* listed as a joystick device, rather than listing actual joysticks only.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - List only real joysticks and accept input from them
|
||||
* "1" - List real joysticks along with the accelerometer as if it were a 3 axis joystick (the default).
|
||||
*/
|
||||
#define SDL_HINT_ACCELEROMETER_AS_JOYSTICK "SDL_ACCELEROMETER_AS_JOYSTICK"
|
||||
|
||||
|
||||
/**
|
||||
* \brief A variable that lets you disable the detection and use of Xinput gamepad devices
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
* "0" - Disable XInput detection (only uses direct input)
|
||||
* "1" - Enable XInput detection (the default)
|
||||
*/
|
||||
#define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED"
|
||||
|
||||
|
||||
/**
|
||||
* \brief A variable that lets you manually hint extra gamecontroller db entries
|
||||
*
|
||||
* The variable should be newline delimited rows of gamecontroller config data, see SDL_gamecontroller.h
|
||||
*
|
||||
* This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)
|
||||
* You can update mappings after the system is initialized with SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping()
|
||||
*/
|
||||
#define SDL_HINT_GAMECONTROLLERCONFIG "SDL_GAMECONTROLLERCONFIG"
|
||||
|
||||
|
||||
/**
|
||||
* \brief A variable that lets you enable joystick (and gamecontroller) events even when your app is in the background.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
* "0" - Disable joystick & gamecontroller input events when the
|
||||
* application is in the background.
|
||||
* "1" - Enable joystick & gamecontroller input events when the
|
||||
* application is in the background.
|
||||
*
|
||||
* The default value is "0". This hint may be set at any time.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
|
||||
|
||||
|
||||
/**
|
||||
* \brief If set to 0 then never set the top most bit on a SDL Window, even if the video mode expects it.
|
||||
* This is a debugging aid for developers and not expected to be used by end users. The default is "1"
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - don't allow topmost
|
||||
* "1" - allow topmost
|
||||
*/
|
||||
#define SDL_HINT_ALLOW_TOPMOST "SDL_ALLOW_TOPMOST"
|
||||
|
||||
|
||||
/**
|
||||
* \brief A variable that controls the timer resolution, in milliseconds.
|
||||
*
|
||||
* The higher resolution the timer, the more frequently the CPU services
|
||||
* timer interrupts, and the more precise delays are, but this takes up
|
||||
* power and CPU time. This hint is only used on Windows 7 and earlier.
|
||||
*
|
||||
* See this blog post for more information:
|
||||
* http://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/
|
||||
*
|
||||
* If this variable is set to "0", the system timer resolution is not set.
|
||||
*
|
||||
* The default value is "1". This hint may be set at any time.
|
||||
*/
|
||||
#define SDL_HINT_TIMER_RESOLUTION "SDL_TIMER_RESOLUTION"
|
||||
|
||||
|
||||
/**
|
||||
* \brief If set to 1, then do not allow high-DPI windows. ("Retina" on Mac)
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_HIGHDPI_DISABLED "SDL_VIDEO_HIGHDPI_DISABLED"
|
||||
|
||||
/**
|
||||
* \brief A variable that determines whether ctrl+click should generate a right-click event on Mac
|
||||
*
|
||||
* If present, holding ctrl while left clicking will generate a right click
|
||||
* event when on Mac.
|
||||
*/
|
||||
#define SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK"
|
||||
|
||||
/**
|
||||
* \brief A variable specifying which shader compiler to preload when using the Chrome ANGLE binaries
|
||||
*
|
||||
* SDL has EGL and OpenGL ES2 support on Windows via the ANGLE project. It
|
||||
* can use two different sets of binaries, those compiled by the user from source
|
||||
* or those provided by the Chrome browser. In the later case, these binaries require
|
||||
* that SDL loads a DLL providing the shader compiler.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "d3dcompiler_46.dll" - default, best for Vista or later.
|
||||
* "d3dcompiler_43.dll" - for XP support.
|
||||
* "none" - do not load any library, useful if you compiled ANGLE from source and included the compiler in your binaries.
|
||||
*
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_WIN_D3DCOMPILER "SDL_VIDEO_WIN_D3DCOMPILER"
|
||||
|
||||
/**
|
||||
* \brief A variable that is the address of another SDL_Window* (as a hex string formatted with "%p").
|
||||
*
|
||||
* If this hint is set before SDL_CreateWindowFrom() and the SDL_Window* it is set to has
|
||||
* SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly
|
||||
* created SDL_Window:
|
||||
*
|
||||
* 1. Its pixel format will be set to the same pixel format as this SDL_Window. This is
|
||||
* needed for example when sharing an OpenGL context across multiple windows.
|
||||
*
|
||||
* 2. The flag SDL_WINDOW_OPENGL will be set on the new window so it can be used for
|
||||
* OpenGL rendering.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* The address (as a string "%p") of the SDL_Window* that new windows created with SDL_CreateWindowFrom() should
|
||||
* share a pixel format with.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT"
|
||||
|
||||
/*
|
||||
* \brief A URL to a WinRT app's privacy policy
|
||||
*
|
||||
* All network-enabled WinRT apps must make a privacy policy available to its
|
||||
* users. On Windows 8, 8.1, and RT, Microsoft mandates that this policy be
|
||||
* be available in the Windows Settings charm, as accessed from within the app.
|
||||
* SDL provides code to add a URL-based link there, which can point to the app's
|
||||
* privacy policy.
|
||||
*
|
||||
* To setup a URL to an app's privacy policy, set SDL_HINT_WINRT_PRIVACY_POLICY_URL
|
||||
* before calling any SDL_Init functions. The contents of the hint should
|
||||
* be a valid URL. For example, "http://www.example.com".
|
||||
*
|
||||
* The default value is "", which will prevent SDL from adding a privacy policy
|
||||
* link to the Settings charm. This hint should only be set during app init.
|
||||
*
|
||||
* The label text of an app's "Privacy Policy" link may be customized via another
|
||||
* hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
|
||||
*
|
||||
* Please note that on Windows Phone, Microsoft does not provide standard UI
|
||||
* for displaying a privacy policy link, and as such, SDL_HINT_WINRT_PRIVACY_POLICY_URL
|
||||
* will not get used on that platform. Network-enabled phone apps should display
|
||||
* their privacy policy through some other, in-app means.
|
||||
*/
|
||||
#define SDL_HINT_WINRT_PRIVACY_POLICY_URL "SDL_HINT_WINRT_PRIVACY_POLICY_URL"
|
||||
|
||||
/** \brief Label text for a WinRT app's privacy policy link
|
||||
*
|
||||
* Network-enabled WinRT apps must include a privacy policy. On Windows 8, 8.1, and RT,
|
||||
* Microsoft mandates that this policy be available via the Windows Settings charm.
|
||||
* SDL provides code to add a link there, with it's label text being set via the
|
||||
* optional hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
|
||||
*
|
||||
* Please note that a privacy policy's contents are not set via this hint. A separate
|
||||
* hint, SDL_HINT_WINRT_PRIVACY_POLICY_URL, is used to link to the actual text of the
|
||||
* policy.
|
||||
*
|
||||
* The contents of this hint should be encoded as a UTF8 string.
|
||||
*
|
||||
* The default value is "Privacy Policy". This hint should only be set during app
|
||||
* initialization, preferably before any calls to SDL_Init.
|
||||
*
|
||||
* For additional information on linking to a privacy policy, see the documentation for
|
||||
* SDL_HINT_WINRT_PRIVACY_POLICY_URL.
|
||||
*/
|
||||
#define SDL_HINT_WINRT_PRIVACY_POLICY_LABEL "SDL_HINT_WINRT_PRIVACY_POLICY_LABEL"
|
||||
|
||||
/** \brief If set to 1, back button press events on Windows Phone 8+ will be marked as handled.
|
||||
*
|
||||
* TODO, WinRT: document SDL_HINT_WINRT_HANDLE_BACK_BUTTON need and use
|
||||
* For now, more details on why this is needed can be found at the
|
||||
* beginning of the following web page:
|
||||
* http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj247550(v=vs.105).aspx
|
||||
*/
|
||||
#define SDL_HINT_WINRT_HANDLE_BACK_BUTTON "SDL_HINT_WINRT_HANDLE_BACK_BUTTON"
|
||||
|
||||
/**
|
||||
* \brief A variable that dictates policy for fullscreen Spaces on Mac OS X.
|
||||
*
|
||||
* This hint only applies to Mac OS X.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
* "0" - Disable Spaces support (FULLSCREEN_DESKTOP won't use them and
|
||||
* SDL_WINDOW_RESIZABLE windows won't offer the "fullscreen"
|
||||
* button on their titlebars).
|
||||
* "1" - Enable Spaces support (FULLSCREEN_DESKTOP will use them and
|
||||
* SDL_WINDOW_RESIZABLE windows will offer the "fullscreen"
|
||||
* button on their titlebars.
|
||||
*
|
||||
* The default value is "1". Spaces are disabled regardless of this hint if
|
||||
* the OS isn't at least Mac OS X Lion (10.7). This hint must be set before
|
||||
* any windows are created.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES "SDL_VIDEO_MAC_FULLSCREEN_SPACES"
|
||||
|
||||
|
||||
/**
|
||||
* \brief An enumeration of hint priorities
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_HINT_DEFAULT,
|
||||
SDL_HINT_NORMAL,
|
||||
SDL_HINT_OVERRIDE
|
||||
} SDL_HintPriority;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Set a hint with a specific priority
|
||||
*
|
||||
* The priority controls the behavior when setting a hint that already
|
||||
* has a value. Hints will replace existing hints of their priority and
|
||||
* lower. Environment variables are considered to have override priority.
|
||||
*
|
||||
* \return SDL_TRUE if the hint was set, SDL_FALSE otherwise
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name,
|
||||
const char *value,
|
||||
SDL_HintPriority priority);
|
||||
|
||||
/**
|
||||
* \brief Set a hint with normal priority
|
||||
*
|
||||
* \return SDL_TRUE if the hint was set, SDL_FALSE otherwise
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
|
||||
const char *value);
|
||||
|
||||
/**
|
||||
* \brief Get a hint
|
||||
*
|
||||
* \return The string value of a hint variable.
|
||||
*/
|
||||
extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
|
||||
|
||||
/**
|
||||
* \brief Add a function to watch a particular hint
|
||||
*
|
||||
* \param name The hint to watch
|
||||
* \param callback The function to call when the hint value changes
|
||||
* \param userdata A pointer to pass to the callback function
|
||||
*/
|
||||
typedef void (*SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue);
|
||||
extern DECLSPEC void SDLCALL SDL_AddHintCallback(const char *name,
|
||||
SDL_HintCallback callback,
|
||||
void *userdata);
|
||||
|
||||
/**
|
||||
* \brief Remove a function watching a particular hint
|
||||
*
|
||||
* \param name The hint being watched
|
||||
* \param callback The function being called when the hint value changes
|
||||
* \param userdata A pointer being passed to the callback function
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_DelHintCallback(const char *name,
|
||||
SDL_HintCallback callback,
|
||||
void *userdata);
|
||||
|
||||
/**
|
||||
* \brief Clear all hints
|
||||
*
|
||||
* This function is called during SDL_Quit() to free stored hints.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_ClearHints(void);
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_hints_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,253 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_joystick.h
|
||||
*
|
||||
* Include file for SDL joystick event handling
|
||||
*
|
||||
* The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks, with the exact joystick
|
||||
* behind a device_index changing as joysticks are plugged and unplugged.
|
||||
*
|
||||
* The term "instance_id" is the current instantiation of a joystick device in the system, if the joystick is removed and then re-inserted
|
||||
* then it will get a new instance_id, instance_id's are monotonically increasing identifiers of a joystick plugged in.
|
||||
*
|
||||
* The term JoystickGUID is a stable 128-bit identifier for a joystick device that does not change over time, it identifies class of
|
||||
* the device (a X360 wired controller for example). This identifier is platform dependent.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SDL_joystick_h
|
||||
#define _SDL_joystick_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \file SDL_joystick.h
|
||||
*
|
||||
* In order to use these functions, SDL_Init() must have been called
|
||||
* with the ::SDL_INIT_JOYSTICK flag. This causes SDL to scan the system
|
||||
* for joysticks, and load appropriate drivers.
|
||||
*
|
||||
* If you would like to receive joystick updates while the application
|
||||
* is in the background, you should set the following hint before calling
|
||||
* SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
|
||||
*/
|
||||
|
||||
/* The joystick structure used to identify an SDL joystick */
|
||||
struct _SDL_Joystick;
|
||||
typedef struct _SDL_Joystick SDL_Joystick;
|
||||
|
||||
/* A structure that encodes the stable unique id for a joystick device */
|
||||
typedef struct {
|
||||
Uint8 data[16];
|
||||
} SDL_JoystickGUID;
|
||||
|
||||
typedef Sint32 SDL_JoystickID;
|
||||
|
||||
|
||||
/* Function prototypes */
|
||||
/**
|
||||
* Count the number of joysticks attached to the system right now
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
|
||||
|
||||
/**
|
||||
* Get the implementation dependent name of a joystick.
|
||||
* This can be called before any joysticks are opened.
|
||||
* If no name can be found, this function returns NULL.
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index);
|
||||
|
||||
/**
|
||||
* Open a joystick for use.
|
||||
* The index passed as an argument refers tothe N'th joystick on the system.
|
||||
* This index is the value which will identify this joystick in future joystick
|
||||
* events.
|
||||
*
|
||||
* \return A joystick identifier, or NULL if an error occurred.
|
||||
*/
|
||||
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index);
|
||||
|
||||
/**
|
||||
* Return the name for this currently opened joystick.
|
||||
* If no name can be found, this function returns NULL.
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick * joystick);
|
||||
|
||||
/**
|
||||
* Return the GUID for the joystick at this index
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetDeviceGUID(int device_index);
|
||||
|
||||
/**
|
||||
* Return the GUID for this opened joystick
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick * joystick);
|
||||
|
||||
/**
|
||||
* Return a string representation for this guid. pszGUID must point to at least 33 bytes
|
||||
* (32 for the string plus a NULL terminator).
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, char *pszGUID, int cbGUID);
|
||||
|
||||
/**
|
||||
* convert a string into a joystick formatted guid
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUIDFromString(const char *pchGUID);
|
||||
|
||||
/**
|
||||
* Returns SDL_TRUE if the joystick has been opened and currently connected, or SDL_FALSE if it has not.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAttached(SDL_Joystick * joystick);
|
||||
|
||||
/**
|
||||
* Get the instance ID of an opened joystick or -1 if the joystick is invalid.
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickInstanceID(SDL_Joystick * joystick);
|
||||
|
||||
/**
|
||||
* Get the number of general axis controls on a joystick.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick * joystick);
|
||||
|
||||
/**
|
||||
* Get the number of trackballs on a joystick.
|
||||
*
|
||||
* Joystick trackballs have only relative motion events associated
|
||||
* with them and their state cannot be polled.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick * joystick);
|
||||
|
||||
/**
|
||||
* Get the number of POV hats on a joystick.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick * joystick);
|
||||
|
||||
/**
|
||||
* Get the number of buttons on a joystick.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick * joystick);
|
||||
|
||||
/**
|
||||
* Update the current state of the open joysticks.
|
||||
*
|
||||
* This is called automatically by the event loop if any joystick
|
||||
* events are enabled.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void);
|
||||
|
||||
/**
|
||||
* Enable/disable joystick event polling.
|
||||
*
|
||||
* If joystick events are disabled, you must call SDL_JoystickUpdate()
|
||||
* yourself and check the state of the joystick when you want joystick
|
||||
* information.
|
||||
*
|
||||
* The state can be one of ::SDL_QUERY, ::SDL_ENABLE or ::SDL_IGNORE.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);
|
||||
|
||||
/**
|
||||
* Get the current state of an axis control on a joystick.
|
||||
*
|
||||
* The state is a value ranging from -32768 to 32767.
|
||||
*
|
||||
* The axis indices start at index 0.
|
||||
*/
|
||||
extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick,
|
||||
int axis);
|
||||
|
||||
/**
|
||||
* \name Hat positions
|
||||
*/
|
||||
/* @{ */
|
||||
#define SDL_HAT_CENTERED 0x00
|
||||
#define SDL_HAT_UP 0x01
|
||||
#define SDL_HAT_RIGHT 0x02
|
||||
#define SDL_HAT_DOWN 0x04
|
||||
#define SDL_HAT_LEFT 0x08
|
||||
#define SDL_HAT_RIGHTUP (SDL_HAT_RIGHT|SDL_HAT_UP)
|
||||
#define SDL_HAT_RIGHTDOWN (SDL_HAT_RIGHT|SDL_HAT_DOWN)
|
||||
#define SDL_HAT_LEFTUP (SDL_HAT_LEFT|SDL_HAT_UP)
|
||||
#define SDL_HAT_LEFTDOWN (SDL_HAT_LEFT|SDL_HAT_DOWN)
|
||||
/* @} */
|
||||
|
||||
/**
|
||||
* Get the current state of a POV hat on a joystick.
|
||||
*
|
||||
* The hat indices start at index 0.
|
||||
*
|
||||
* \return The return value is one of the following positions:
|
||||
* - ::SDL_HAT_CENTERED
|
||||
* - ::SDL_HAT_UP
|
||||
* - ::SDL_HAT_RIGHT
|
||||
* - ::SDL_HAT_DOWN
|
||||
* - ::SDL_HAT_LEFT
|
||||
* - ::SDL_HAT_RIGHTUP
|
||||
* - ::SDL_HAT_RIGHTDOWN
|
||||
* - ::SDL_HAT_LEFTUP
|
||||
* - ::SDL_HAT_LEFTDOWN
|
||||
*/
|
||||
extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick * joystick,
|
||||
int hat);
|
||||
|
||||
/**
|
||||
* Get the ball axis change since the last poll.
|
||||
*
|
||||
* \return 0, or -1 if you passed it invalid parameters.
|
||||
*
|
||||
* The ball indices start at index 0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick,
|
||||
int ball, int *dx, int *dy);
|
||||
|
||||
/**
|
||||
* Get the current state of a button on a joystick.
|
||||
*
|
||||
* The button indices start at index 0.
|
||||
*/
|
||||
extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick,
|
||||
int button);
|
||||
|
||||
/**
|
||||
* Close a joystick previously opened with SDL_JoystickOpen().
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick * joystick);
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_joystick_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,217 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_keyboard.h
|
||||
*
|
||||
* Include file for SDL keyboard event handling
|
||||
*/
|
||||
|
||||
#ifndef _SDL_keyboard_h
|
||||
#define _SDL_keyboard_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_keycode.h"
|
||||
#include "SDL_video.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief The SDL keysym structure, used in key events.
|
||||
*
|
||||
* \note If you are looking for translated character input, see the ::SDL_TEXTINPUT event.
|
||||
*/
|
||||
typedef struct SDL_Keysym
|
||||
{
|
||||
SDL_Scancode scancode; /**< SDL physical key code - see ::SDL_Scancode for details */
|
||||
SDL_Keycode sym; /**< SDL virtual key code - see ::SDL_Keycode for details */
|
||||
Uint16 mod; /**< current key modifiers */
|
||||
Uint32 unused;
|
||||
} SDL_Keysym;
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/**
|
||||
* \brief Get the window which currently has keyboard focus.
|
||||
*/
|
||||
extern DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void);
|
||||
|
||||
/**
|
||||
* \brief Get a snapshot of the current state of the keyboard.
|
||||
*
|
||||
* \param numkeys if non-NULL, receives the length of the returned array.
|
||||
*
|
||||
* \return An array of key states. Indexes into this array are obtained by using ::SDL_Scancode values.
|
||||
*
|
||||
* \b Example:
|
||||
* \code
|
||||
* const Uint8 *state = SDL_GetKeyboardState(NULL);
|
||||
* if ( state[SDL_SCANCODE_RETURN] ) {
|
||||
* printf("<RETURN> is pressed.\n");
|
||||
* }
|
||||
* \endcode
|
||||
*/
|
||||
extern DECLSPEC const Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys);
|
||||
|
||||
/**
|
||||
* \brief Get the current key modifier state for the keyboard.
|
||||
*/
|
||||
extern DECLSPEC SDL_Keymod SDLCALL SDL_GetModState(void);
|
||||
|
||||
/**
|
||||
* \brief Set the current key modifier state for the keyboard.
|
||||
*
|
||||
* \note This does not change the keyboard state, only the key modifier flags.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SetModState(SDL_Keymod modstate);
|
||||
|
||||
/**
|
||||
* \brief Get the key code corresponding to the given scancode according
|
||||
* to the current keyboard layout.
|
||||
*
|
||||
* See ::SDL_Keycode for details.
|
||||
*
|
||||
* \sa SDL_GetKeyName()
|
||||
*/
|
||||
extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromScancode(SDL_Scancode scancode);
|
||||
|
||||
/**
|
||||
* \brief Get the scancode corresponding to the given key code according to the
|
||||
* current keyboard layout.
|
||||
*
|
||||
* See ::SDL_Scancode for details.
|
||||
*
|
||||
* \sa SDL_GetScancodeName()
|
||||
*/
|
||||
extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromKey(SDL_Keycode key);
|
||||
|
||||
/**
|
||||
* \brief Get a human-readable name for a scancode.
|
||||
*
|
||||
* \return A pointer to the name for the scancode.
|
||||
* If the scancode doesn't have a name, this function returns
|
||||
* an empty string ("").
|
||||
*
|
||||
* \sa SDL_Scancode
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GetScancodeName(SDL_Scancode scancode);
|
||||
|
||||
/**
|
||||
* \brief Get a scancode from a human-readable name
|
||||
*
|
||||
* \return scancode, or SDL_SCANCODE_UNKNOWN if the name wasn't recognized
|
||||
*
|
||||
* \sa SDL_Scancode
|
||||
*/
|
||||
extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *name);
|
||||
|
||||
/**
|
||||
* \brief Get a human-readable name for a key.
|
||||
*
|
||||
* \return A pointer to a UTF-8 string that stays valid at least until the next
|
||||
* call to this function. If you need it around any longer, you must
|
||||
* copy it. If the key doesn't have a name, this function returns an
|
||||
* empty string ("").
|
||||
*
|
||||
* \sa SDL_Key
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDL_Keycode key);
|
||||
|
||||
/**
|
||||
* \brief Get a key code from a human-readable name
|
||||
*
|
||||
* \return key code, or SDLK_UNKNOWN if the name wasn't recognized
|
||||
*
|
||||
* \sa SDL_Keycode
|
||||
*/
|
||||
extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromName(const char *name);
|
||||
|
||||
/**
|
||||
* \brief Start accepting Unicode text input events.
|
||||
* This function will show the on-screen keyboard if supported.
|
||||
*
|
||||
* \sa SDL_StopTextInput()
|
||||
* \sa SDL_SetTextInputRect()
|
||||
* \sa SDL_HasScreenKeyboardSupport()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_StartTextInput(void);
|
||||
|
||||
/**
|
||||
* \brief Return whether or not Unicode text input events are enabled.
|
||||
*
|
||||
* \sa SDL_StartTextInput()
|
||||
* \sa SDL_StopTextInput()
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputActive(void);
|
||||
|
||||
/**
|
||||
* \brief Stop receiving any text input events.
|
||||
* This function will hide the on-screen keyboard if supported.
|
||||
*
|
||||
* \sa SDL_StartTextInput()
|
||||
* \sa SDL_HasScreenKeyboardSupport()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_StopTextInput(void);
|
||||
|
||||
/**
|
||||
* \brief Set the rectangle used to type Unicode text inputs.
|
||||
* This is used as a hint for IME and on-screen keyboard placement.
|
||||
*
|
||||
* \sa SDL_StartTextInput()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SetTextInputRect(SDL_Rect *rect);
|
||||
|
||||
/**
|
||||
* \brief Returns whether the platform has some screen keyboard support.
|
||||
*
|
||||
* \return SDL_TRUE if some keyboard support is available else SDL_FALSE.
|
||||
*
|
||||
* \note Not all screen keyboard functions are supported on all platforms.
|
||||
*
|
||||
* \sa SDL_IsScreenKeyboardShown()
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasScreenKeyboardSupport(void);
|
||||
|
||||
/**
|
||||
* \brief Returns whether the screen keyboard is shown for given window.
|
||||
*
|
||||
* \param window The window for which screen keyboard should be queried.
|
||||
*
|
||||
* \return SDL_TRUE if screen keyboard is shown else SDL_FALSE.
|
||||
*
|
||||
* \sa SDL_HasScreenKeyboardSupport()
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenKeyboardShown(SDL_Window *window);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_keyboard_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,341 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_keycode.h
|
||||
*
|
||||
* Defines constants which identify keyboard keys and modifiers.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_keycode_h
|
||||
#define _SDL_keycode_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_scancode.h"
|
||||
|
||||
/**
|
||||
* \brief The SDL virtual key representation.
|
||||
*
|
||||
* Values of this type are used to represent keyboard keys using the current
|
||||
* layout of the keyboard. These values include Unicode values representing
|
||||
* the unmodified character that would be generated by pressing the key, or
|
||||
* an SDLK_* constant for those keys that do not generate characters.
|
||||
*/
|
||||
typedef Sint32 SDL_Keycode;
|
||||
|
||||
#define SDLK_SCANCODE_MASK (1<<30)
|
||||
#define SDL_SCANCODE_TO_KEYCODE(X) (X | SDLK_SCANCODE_MASK)
|
||||
|
||||
enum
|
||||
{
|
||||
SDLK_UNKNOWN = 0,
|
||||
|
||||
SDLK_RETURN = '\r',
|
||||
SDLK_ESCAPE = '\033',
|
||||
SDLK_BACKSPACE = '\b',
|
||||
SDLK_TAB = '\t',
|
||||
SDLK_SPACE = ' ',
|
||||
SDLK_EXCLAIM = '!',
|
||||
SDLK_QUOTEDBL = '"',
|
||||
SDLK_HASH = '#',
|
||||
SDLK_PERCENT = '%',
|
||||
SDLK_DOLLAR = '$',
|
||||
SDLK_AMPERSAND = '&',
|
||||
SDLK_QUOTE = '\'',
|
||||
SDLK_LEFTPAREN = '(',
|
||||
SDLK_RIGHTPAREN = ')',
|
||||
SDLK_ASTERISK = '*',
|
||||
SDLK_PLUS = '+',
|
||||
SDLK_COMMA = ',',
|
||||
SDLK_MINUS = '-',
|
||||
SDLK_PERIOD = '.',
|
||||
SDLK_SLASH = '/',
|
||||
SDLK_0 = '0',
|
||||
SDLK_1 = '1',
|
||||
SDLK_2 = '2',
|
||||
SDLK_3 = '3',
|
||||
SDLK_4 = '4',
|
||||
SDLK_5 = '5',
|
||||
SDLK_6 = '6',
|
||||
SDLK_7 = '7',
|
||||
SDLK_8 = '8',
|
||||
SDLK_9 = '9',
|
||||
SDLK_COLON = ':',
|
||||
SDLK_SEMICOLON = ';',
|
||||
SDLK_LESS = '<',
|
||||
SDLK_EQUALS = '=',
|
||||
SDLK_GREATER = '>',
|
||||
SDLK_QUESTION = '?',
|
||||
SDLK_AT = '@',
|
||||
/*
|
||||
Skip uppercase letters
|
||||
*/
|
||||
SDLK_LEFTBRACKET = '[',
|
||||
SDLK_BACKSLASH = '\\',
|
||||
SDLK_RIGHTBRACKET = ']',
|
||||
SDLK_CARET = '^',
|
||||
SDLK_UNDERSCORE = '_',
|
||||
SDLK_BACKQUOTE = '`',
|
||||
SDLK_a = 'a',
|
||||
SDLK_b = 'b',
|
||||
SDLK_c = 'c',
|
||||
SDLK_d = 'd',
|
||||
SDLK_e = 'e',
|
||||
SDLK_f = 'f',
|
||||
SDLK_g = 'g',
|
||||
SDLK_h = 'h',
|
||||
SDLK_i = 'i',
|
||||
SDLK_j = 'j',
|
||||
SDLK_k = 'k',
|
||||
SDLK_l = 'l',
|
||||
SDLK_m = 'm',
|
||||
SDLK_n = 'n',
|
||||
SDLK_o = 'o',
|
||||
SDLK_p = 'p',
|
||||
SDLK_q = 'q',
|
||||
SDLK_r = 'r',
|
||||
SDLK_s = 's',
|
||||
SDLK_t = 't',
|
||||
SDLK_u = 'u',
|
||||
SDLK_v = 'v',
|
||||
SDLK_w = 'w',
|
||||
SDLK_x = 'x',
|
||||
SDLK_y = 'y',
|
||||
SDLK_z = 'z',
|
||||
|
||||
SDLK_CAPSLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CAPSLOCK),
|
||||
|
||||
SDLK_F1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F1),
|
||||
SDLK_F2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F2),
|
||||
SDLK_F3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F3),
|
||||
SDLK_F4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F4),
|
||||
SDLK_F5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F5),
|
||||
SDLK_F6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F6),
|
||||
SDLK_F7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F7),
|
||||
SDLK_F8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F8),
|
||||
SDLK_F9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F9),
|
||||
SDLK_F10 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F10),
|
||||
SDLK_F11 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F11),
|
||||
SDLK_F12 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F12),
|
||||
|
||||
SDLK_PRINTSCREEN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRINTSCREEN),
|
||||
SDLK_SCROLLLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SCROLLLOCK),
|
||||
SDLK_PAUSE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAUSE),
|
||||
SDLK_INSERT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_INSERT),
|
||||
SDLK_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HOME),
|
||||
SDLK_PAGEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEUP),
|
||||
SDLK_DELETE = '\177',
|
||||
SDLK_END = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_END),
|
||||
SDLK_PAGEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEDOWN),
|
||||
SDLK_RIGHT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RIGHT),
|
||||
SDLK_LEFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LEFT),
|
||||
SDLK_DOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DOWN),
|
||||
SDLK_UP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UP),
|
||||
|
||||
SDLK_NUMLOCKCLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_NUMLOCKCLEAR),
|
||||
SDLK_KP_DIVIDE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DIVIDE),
|
||||
SDLK_KP_MULTIPLY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MULTIPLY),
|
||||
SDLK_KP_MINUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MINUS),
|
||||
SDLK_KP_PLUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUS),
|
||||
SDLK_KP_ENTER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_ENTER),
|
||||
SDLK_KP_1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_1),
|
||||
SDLK_KP_2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_2),
|
||||
SDLK_KP_3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_3),
|
||||
SDLK_KP_4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_4),
|
||||
SDLK_KP_5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_5),
|
||||
SDLK_KP_6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_6),
|
||||
SDLK_KP_7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_7),
|
||||
SDLK_KP_8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_8),
|
||||
SDLK_KP_9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_9),
|
||||
SDLK_KP_0 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_0),
|
||||
SDLK_KP_PERIOD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERIOD),
|
||||
|
||||
SDLK_APPLICATION = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APPLICATION),
|
||||
SDLK_POWER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_POWER),
|
||||
SDLK_KP_EQUALS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALS),
|
||||
SDLK_F13 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F13),
|
||||
SDLK_F14 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F14),
|
||||
SDLK_F15 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F15),
|
||||
SDLK_F16 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F16),
|
||||
SDLK_F17 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F17),
|
||||
SDLK_F18 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F18),
|
||||
SDLK_F19 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F19),
|
||||
SDLK_F20 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F20),
|
||||
SDLK_F21 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F21),
|
||||
SDLK_F22 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F22),
|
||||
SDLK_F23 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F23),
|
||||
SDLK_F24 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F24),
|
||||
SDLK_EXECUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXECUTE),
|
||||
SDLK_HELP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HELP),
|
||||
SDLK_MENU = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MENU),
|
||||
SDLK_SELECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SELECT),
|
||||
SDLK_STOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_STOP),
|
||||
SDLK_AGAIN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AGAIN),
|
||||
SDLK_UNDO = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UNDO),
|
||||
SDLK_CUT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CUT),
|
||||
SDLK_COPY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COPY),
|
||||
SDLK_PASTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PASTE),
|
||||
SDLK_FIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_FIND),
|
||||
SDLK_MUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MUTE),
|
||||
SDLK_VOLUMEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEUP),
|
||||
SDLK_VOLUMEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEDOWN),
|
||||
SDLK_KP_COMMA = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COMMA),
|
||||
SDLK_KP_EQUALSAS400 =
|
||||
SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALSAS400),
|
||||
|
||||
SDLK_ALTERASE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ALTERASE),
|
||||
SDLK_SYSREQ = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SYSREQ),
|
||||
SDLK_CANCEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CANCEL),
|
||||
SDLK_CLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEAR),
|
||||
SDLK_PRIOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRIOR),
|
||||
SDLK_RETURN2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RETURN2),
|
||||
SDLK_SEPARATOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SEPARATOR),
|
||||
SDLK_OUT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OUT),
|
||||
SDLK_OPER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OPER),
|
||||
SDLK_CLEARAGAIN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEARAGAIN),
|
||||
SDLK_CRSEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CRSEL),
|
||||
SDLK_EXSEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXSEL),
|
||||
|
||||
SDLK_KP_00 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_00),
|
||||
SDLK_KP_000 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_000),
|
||||
SDLK_THOUSANDSSEPARATOR =
|
||||
SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_THOUSANDSSEPARATOR),
|
||||
SDLK_DECIMALSEPARATOR =
|
||||
SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DECIMALSEPARATOR),
|
||||
SDLK_CURRENCYUNIT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYUNIT),
|
||||
SDLK_CURRENCYSUBUNIT =
|
||||
SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYSUBUNIT),
|
||||
SDLK_KP_LEFTPAREN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTPAREN),
|
||||
SDLK_KP_RIGHTPAREN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTPAREN),
|
||||
SDLK_KP_LEFTBRACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTBRACE),
|
||||
SDLK_KP_RIGHTBRACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTBRACE),
|
||||
SDLK_KP_TAB = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_TAB),
|
||||
SDLK_KP_BACKSPACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BACKSPACE),
|
||||
SDLK_KP_A = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_A),
|
||||
SDLK_KP_B = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_B),
|
||||
SDLK_KP_C = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_C),
|
||||
SDLK_KP_D = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_D),
|
||||
SDLK_KP_E = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_E),
|
||||
SDLK_KP_F = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_F),
|
||||
SDLK_KP_XOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_XOR),
|
||||
SDLK_KP_POWER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_POWER),
|
||||
SDLK_KP_PERCENT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERCENT),
|
||||
SDLK_KP_LESS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LESS),
|
||||
SDLK_KP_GREATER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_GREATER),
|
||||
SDLK_KP_AMPERSAND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AMPERSAND),
|
||||
SDLK_KP_DBLAMPERSAND =
|
||||
SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLAMPERSAND),
|
||||
SDLK_KP_VERTICALBAR =
|
||||
SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_VERTICALBAR),
|
||||
SDLK_KP_DBLVERTICALBAR =
|
||||
SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLVERTICALBAR),
|
||||
SDLK_KP_COLON = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COLON),
|
||||
SDLK_KP_HASH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HASH),
|
||||
SDLK_KP_SPACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_SPACE),
|
||||
SDLK_KP_AT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AT),
|
||||
SDLK_KP_EXCLAM = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EXCLAM),
|
||||
SDLK_KP_MEMSTORE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSTORE),
|
||||
SDLK_KP_MEMRECALL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMRECALL),
|
||||
SDLK_KP_MEMCLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMCLEAR),
|
||||
SDLK_KP_MEMADD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMADD),
|
||||
SDLK_KP_MEMSUBTRACT =
|
||||
SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSUBTRACT),
|
||||
SDLK_KP_MEMMULTIPLY =
|
||||
SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMMULTIPLY),
|
||||
SDLK_KP_MEMDIVIDE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMDIVIDE),
|
||||
SDLK_KP_PLUSMINUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUSMINUS),
|
||||
SDLK_KP_CLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEAR),
|
||||
SDLK_KP_CLEARENTRY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEARENTRY),
|
||||
SDLK_KP_BINARY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BINARY),
|
||||
SDLK_KP_OCTAL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_OCTAL),
|
||||
SDLK_KP_DECIMAL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DECIMAL),
|
||||
SDLK_KP_HEXADECIMAL =
|
||||
SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HEXADECIMAL),
|
||||
|
||||
SDLK_LCTRL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LCTRL),
|
||||
SDLK_LSHIFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LSHIFT),
|
||||
SDLK_LALT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LALT),
|
||||
SDLK_LGUI = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LGUI),
|
||||
SDLK_RCTRL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RCTRL),
|
||||
SDLK_RSHIFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RSHIFT),
|
||||
SDLK_RALT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RALT),
|
||||
SDLK_RGUI = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RGUI),
|
||||
|
||||
SDLK_MODE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MODE),
|
||||
|
||||
SDLK_AUDIONEXT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIONEXT),
|
||||
SDLK_AUDIOPREV = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPREV),
|
||||
SDLK_AUDIOSTOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOSTOP),
|
||||
SDLK_AUDIOPLAY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPLAY),
|
||||
SDLK_AUDIOMUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOMUTE),
|
||||
SDLK_MEDIASELECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIASELECT),
|
||||
SDLK_WWW = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_WWW),
|
||||
SDLK_MAIL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MAIL),
|
||||
SDLK_CALCULATOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALCULATOR),
|
||||
SDLK_COMPUTER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COMPUTER),
|
||||
SDLK_AC_SEARCH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_SEARCH),
|
||||
SDLK_AC_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_HOME),
|
||||
SDLK_AC_BACK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BACK),
|
||||
SDLK_AC_FORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_FORWARD),
|
||||
SDLK_AC_STOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_STOP),
|
||||
SDLK_AC_REFRESH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_REFRESH),
|
||||
SDLK_AC_BOOKMARKS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BOOKMARKS),
|
||||
|
||||
SDLK_BRIGHTNESSDOWN =
|
||||
SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSDOWN),
|
||||
SDLK_BRIGHTNESSUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSUP),
|
||||
SDLK_DISPLAYSWITCH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DISPLAYSWITCH),
|
||||
SDLK_KBDILLUMTOGGLE =
|
||||
SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMTOGGLE),
|
||||
SDLK_KBDILLUMDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMDOWN),
|
||||
SDLK_KBDILLUMUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMUP),
|
||||
SDLK_EJECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EJECT),
|
||||
SDLK_SLEEP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SLEEP)
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Enumeration of valid key mods (possibly OR'd together).
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
KMOD_NONE = 0x0000,
|
||||
KMOD_LSHIFT = 0x0001,
|
||||
KMOD_RSHIFT = 0x0002,
|
||||
KMOD_LCTRL = 0x0040,
|
||||
KMOD_RCTRL = 0x0080,
|
||||
KMOD_LALT = 0x0100,
|
||||
KMOD_RALT = 0x0200,
|
||||
KMOD_LGUI = 0x0400,
|
||||
KMOD_RGUI = 0x0800,
|
||||
KMOD_NUM = 0x1000,
|
||||
KMOD_CAPS = 0x2000,
|
||||
KMOD_MODE = 0x4000,
|
||||
KMOD_RESERVED = 0x8000
|
||||
} SDL_Keymod;
|
||||
|
||||
#define KMOD_CTRL (KMOD_LCTRL|KMOD_RCTRL)
|
||||
#define KMOD_SHIFT (KMOD_LSHIFT|KMOD_RSHIFT)
|
||||
#define KMOD_ALT (KMOD_LALT|KMOD_RALT)
|
||||
#define KMOD_GUI (KMOD_LGUI|KMOD_RGUI)
|
||||
|
||||
#endif /* _SDL_keycode_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_loadso.h
|
||||
*
|
||||
* System dependent library loading routines
|
||||
*
|
||||
* Some things to keep in mind:
|
||||
* \li These functions only work on C function names. Other languages may
|
||||
* have name mangling and intrinsic language support that varies from
|
||||
* compiler to compiler.
|
||||
* \li Make sure you declare your function pointers with the same calling
|
||||
* convention as the actual library function. Your code will crash
|
||||
* mysteriously if you do not do this.
|
||||
* \li Avoid namespace collisions. If you load a symbol from the library,
|
||||
* it is not defined whether or not it goes into the global symbol
|
||||
* namespace for the application. If it does and it conflicts with
|
||||
* symbols in your code or other shared libraries, you will not get
|
||||
* the results you expect. :)
|
||||
*/
|
||||
|
||||
#ifndef _SDL_loadso_h
|
||||
#define _SDL_loadso_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* This function dynamically loads a shared object and returns a pointer
|
||||
* to the object handle (or NULL if there was an error).
|
||||
* The 'sofile' parameter is a system dependent name of the object file.
|
||||
*/
|
||||
extern DECLSPEC void *SDLCALL SDL_LoadObject(const char *sofile);
|
||||
|
||||
/**
|
||||
* Given an object handle, this function looks up the address of the
|
||||
* named function in the shared object and returns it. This address
|
||||
* is no longer valid after calling SDL_UnloadObject().
|
||||
*/
|
||||
extern DECLSPEC void *SDLCALL SDL_LoadFunction(void *handle,
|
||||
const char *name);
|
||||
|
||||
/**
|
||||
* Unload a shared object from memory.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_loadso_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,211 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_log.h
|
||||
*
|
||||
* Simple log messages with categories and priorities.
|
||||
*
|
||||
* By default logs are quiet, but if you're debugging SDL you might want:
|
||||
*
|
||||
* SDL_LogSetAllPriority(SDL_LOG_PRIORITY_WARN);
|
||||
*
|
||||
* Here's where the messages go on different platforms:
|
||||
* Windows: debug output stream
|
||||
* Android: log output
|
||||
* Others: standard error output (stderr)
|
||||
*/
|
||||
|
||||
#ifndef _SDL_log_h
|
||||
#define _SDL_log_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* \brief The maximum size of a log message
|
||||
*
|
||||
* Messages longer than the maximum size will be truncated
|
||||
*/
|
||||
#define SDL_MAX_LOG_MESSAGE 4096
|
||||
|
||||
/**
|
||||
* \brief The predefined log categories
|
||||
*
|
||||
* By default the application category is enabled at the INFO level,
|
||||
* the assert category is enabled at the WARN level, test is enabled
|
||||
* at the VERBOSE level and all other categories are enabled at the
|
||||
* CRITICAL level.
|
||||
*/
|
||||
enum
|
||||
{
|
||||
SDL_LOG_CATEGORY_APPLICATION,
|
||||
SDL_LOG_CATEGORY_ERROR,
|
||||
SDL_LOG_CATEGORY_ASSERT,
|
||||
SDL_LOG_CATEGORY_SYSTEM,
|
||||
SDL_LOG_CATEGORY_AUDIO,
|
||||
SDL_LOG_CATEGORY_VIDEO,
|
||||
SDL_LOG_CATEGORY_RENDER,
|
||||
SDL_LOG_CATEGORY_INPUT,
|
||||
SDL_LOG_CATEGORY_TEST,
|
||||
|
||||
/* Reserved for future SDL library use */
|
||||
SDL_LOG_CATEGORY_RESERVED1,
|
||||
SDL_LOG_CATEGORY_RESERVED2,
|
||||
SDL_LOG_CATEGORY_RESERVED3,
|
||||
SDL_LOG_CATEGORY_RESERVED4,
|
||||
SDL_LOG_CATEGORY_RESERVED5,
|
||||
SDL_LOG_CATEGORY_RESERVED6,
|
||||
SDL_LOG_CATEGORY_RESERVED7,
|
||||
SDL_LOG_CATEGORY_RESERVED8,
|
||||
SDL_LOG_CATEGORY_RESERVED9,
|
||||
SDL_LOG_CATEGORY_RESERVED10,
|
||||
|
||||
/* Beyond this point is reserved for application use, e.g.
|
||||
enum {
|
||||
MYAPP_CATEGORY_AWESOME1 = SDL_LOG_CATEGORY_CUSTOM,
|
||||
MYAPP_CATEGORY_AWESOME2,
|
||||
MYAPP_CATEGORY_AWESOME3,
|
||||
...
|
||||
};
|
||||
*/
|
||||
SDL_LOG_CATEGORY_CUSTOM
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief The predefined log priorities
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_LOG_PRIORITY_VERBOSE = 1,
|
||||
SDL_LOG_PRIORITY_DEBUG,
|
||||
SDL_LOG_PRIORITY_INFO,
|
||||
SDL_LOG_PRIORITY_WARN,
|
||||
SDL_LOG_PRIORITY_ERROR,
|
||||
SDL_LOG_PRIORITY_CRITICAL,
|
||||
SDL_NUM_LOG_PRIORITIES
|
||||
} SDL_LogPriority;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Set the priority of all log categories
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LogSetAllPriority(SDL_LogPriority priority);
|
||||
|
||||
/**
|
||||
* \brief Set the priority of a particular log category
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LogSetPriority(int category,
|
||||
SDL_LogPriority priority);
|
||||
|
||||
/**
|
||||
* \brief Get the priority of a particular log category
|
||||
*/
|
||||
extern DECLSPEC SDL_LogPriority SDLCALL SDL_LogGetPriority(int category);
|
||||
|
||||
/**
|
||||
* \brief Reset all priorities to default.
|
||||
*
|
||||
* \note This is called in SDL_Quit().
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LogResetPriorities(void);
|
||||
|
||||
/**
|
||||
* \brief Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_Log(const char *fmt, ...);
|
||||
|
||||
/**
|
||||
* \brief Log a message with SDL_LOG_PRIORITY_VERBOSE
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LogVerbose(int category, const char *fmt, ...);
|
||||
|
||||
/**
|
||||
* \brief Log a message with SDL_LOG_PRIORITY_DEBUG
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LogDebug(int category, const char *fmt, ...);
|
||||
|
||||
/**
|
||||
* \brief Log a message with SDL_LOG_PRIORITY_INFO
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LogInfo(int category, const char *fmt, ...);
|
||||
|
||||
/**
|
||||
* \brief Log a message with SDL_LOG_PRIORITY_WARN
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LogWarn(int category, const char *fmt, ...);
|
||||
|
||||
/**
|
||||
* \brief Log a message with SDL_LOG_PRIORITY_ERROR
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LogError(int category, const char *fmt, ...);
|
||||
|
||||
/**
|
||||
* \brief Log a message with SDL_LOG_PRIORITY_CRITICAL
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LogCritical(int category, const char *fmt, ...);
|
||||
|
||||
/**
|
||||
* \brief Log a message with the specified category and priority.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LogMessage(int category,
|
||||
SDL_LogPriority priority,
|
||||
const char *fmt, ...);
|
||||
|
||||
/**
|
||||
* \brief Log a message with the specified category and priority.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LogMessageV(int category,
|
||||
SDL_LogPriority priority,
|
||||
const char *fmt, va_list ap);
|
||||
|
||||
/**
|
||||
* \brief The prototype for the log output function
|
||||
*/
|
||||
typedef void (*SDL_LogOutputFunction)(void *userdata, int category, SDL_LogPriority priority, const char *message);
|
||||
|
||||
/**
|
||||
* \brief Get the current log output function.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LogGetOutputFunction(SDL_LogOutputFunction *callback, void **userdata);
|
||||
|
||||
/**
|
||||
* \brief This function allows you to replace the default log output
|
||||
* function with one of your own.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LogSetOutputFunction(SDL_LogOutputFunction callback, void *userdata);
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_log_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,155 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_main_h
|
||||
#define _SDL_main_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
/**
|
||||
* \file SDL_main.h
|
||||
*
|
||||
* Redefine main() on some platforms so that it is called by SDL.
|
||||
*/
|
||||
|
||||
#ifndef SDL_MAIN_HANDLED
|
||||
#if defined(__WIN32__)
|
||||
/* On Windows SDL provides WinMain(), which parses the command line and passes
|
||||
the arguments to your main function.
|
||||
|
||||
If you provide your own WinMain(), you may define SDL_MAIN_HANDLED
|
||||
*/
|
||||
#define SDL_MAIN_AVAILABLE
|
||||
|
||||
#elif defined(__WINRT__)
|
||||
/* On WinRT, SDL provides a main function that initializes CoreApplication,
|
||||
creating an instance of IFrameworkView in the process.
|
||||
|
||||
Please note that #include'ing SDL_main.h is not enough to get a main()
|
||||
function working. In non-XAML apps, the file,
|
||||
src/main/winrt/SDL_WinRT_main_NonXAML.cpp, or a copy of it, must be compiled
|
||||
into the app itself. In XAML apps, the function, SDL_WinRTRunApp must be
|
||||
called, with a pointer to the Direct3D-hosted XAML control passed in.
|
||||
*/
|
||||
#define SDL_MAIN_NEEDED
|
||||
|
||||
#elif defined(__IPHONEOS__)
|
||||
/* On iOS SDL provides a main function that creates an application delegate
|
||||
and starts the iOS application run loop.
|
||||
|
||||
See src/video/uikit/SDL_uikitappdelegate.m for more details.
|
||||
*/
|
||||
#define SDL_MAIN_NEEDED
|
||||
|
||||
#elif defined(__ANDROID__)
|
||||
/* On Android SDL provides a Java class in SDLActivity.java that is the
|
||||
main activity entry point.
|
||||
|
||||
See README-android.txt for more details on extending that class.
|
||||
*/
|
||||
#define SDL_MAIN_NEEDED
|
||||
|
||||
#endif
|
||||
#endif /* SDL_MAIN_HANDLED */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define C_LINKAGE "C"
|
||||
#else
|
||||
#define C_LINKAGE
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/**
|
||||
* \file SDL_main.h
|
||||
*
|
||||
* The application's main() function must be called with C linkage,
|
||||
* and should be declared like this:
|
||||
* \code
|
||||
* #ifdef __cplusplus
|
||||
* extern "C"
|
||||
* #endif
|
||||
* int main(int argc, char *argv[])
|
||||
* {
|
||||
* }
|
||||
* \endcode
|
||||
*/
|
||||
|
||||
#if defined(SDL_MAIN_NEEDED) || defined(SDL_MAIN_AVAILABLE)
|
||||
#define main SDL_main
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The prototype for the application's main() function
|
||||
*/
|
||||
extern C_LINKAGE int SDL_main(int argc, char *argv[]);
|
||||
|
||||
|
||||
#include "begin_code.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* This is called by the real SDL main function to let the rest of the
|
||||
* library know that initialization was done properly.
|
||||
*
|
||||
* Calling this yourself without knowing what you're doing can cause
|
||||
* crashes and hard to diagnose problems with your application.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SetMainReady(void);
|
||||
|
||||
#ifdef __WIN32__
|
||||
|
||||
/**
|
||||
* This can be called to set the application class at startup
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style,
|
||||
void *hInst);
|
||||
extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
|
||||
|
||||
#endif /* __WIN32__ */
|
||||
|
||||
|
||||
#ifdef __WINRT__
|
||||
|
||||
/**
|
||||
* \brief Initializes and launches an SDL/WinRT application.
|
||||
*
|
||||
* \param mainFunction The SDL app's C-style main().
|
||||
* \param xamlBackgroundPanel An optional, XAML-based, background panel.
|
||||
* For Non-XAML apps, this value must be set to NULL. For XAML apps,
|
||||
* pass in a pointer to a SwapChainBackgroundPanel, casted to an
|
||||
* IInspectable (via reinterpret_cast).
|
||||
* \ret 0 on success, -1 on failure. On failure, use SDL_GetError to retrieve more
|
||||
* information on the failure.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_WinRTRunApp(int (*mainFunction)(int, char **), void * xamlBackgroundPanel);
|
||||
|
||||
#endif /* __WINRT__ */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_main_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,144 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_messagebox_h
|
||||
#define _SDL_messagebox_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_video.h" /* For SDL_Window */
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief SDL_MessageBox flags. If supported will display warning icon, etc.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_MESSAGEBOX_ERROR = 0x00000010, /**< error dialog */
|
||||
SDL_MESSAGEBOX_WARNING = 0x00000020, /**< warning dialog */
|
||||
SDL_MESSAGEBOX_INFORMATION = 0x00000040 /**< informational dialog */
|
||||
} SDL_MessageBoxFlags;
|
||||
|
||||
/**
|
||||
* \brief Flags for SDL_MessageBoxButtonData.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT = 0x00000001, /**< Marks the default button when return is hit */
|
||||
SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT = 0x00000002 /**< Marks the default button when escape is hit */
|
||||
} SDL_MessageBoxButtonFlags;
|
||||
|
||||
/**
|
||||
* \brief Individual button data.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
Uint32 flags; /**< ::SDL_MessageBoxButtonFlags */
|
||||
int buttonid; /**< User defined button id (value returned via SDL_ShowMessageBox) */
|
||||
const char * text; /**< The UTF-8 button text */
|
||||
} SDL_MessageBoxButtonData;
|
||||
|
||||
/**
|
||||
* \brief RGB value used in a message box color scheme
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
Uint8 r, g, b;
|
||||
} SDL_MessageBoxColor;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SDL_MESSAGEBOX_COLOR_BACKGROUND,
|
||||
SDL_MESSAGEBOX_COLOR_TEXT,
|
||||
SDL_MESSAGEBOX_COLOR_BUTTON_BORDER,
|
||||
SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND,
|
||||
SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED,
|
||||
SDL_MESSAGEBOX_COLOR_MAX
|
||||
} SDL_MessageBoxColorType;
|
||||
|
||||
/**
|
||||
* \brief A set of colors to use for message box dialogs
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
SDL_MessageBoxColor colors[SDL_MESSAGEBOX_COLOR_MAX];
|
||||
} SDL_MessageBoxColorScheme;
|
||||
|
||||
/**
|
||||
* \brief MessageBox structure containing title, text, window, etc.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
Uint32 flags; /**< ::SDL_MessageBoxFlags */
|
||||
SDL_Window *window; /**< Parent window, can be NULL */
|
||||
const char *title; /**< UTF-8 title */
|
||||
const char *message; /**< UTF-8 message text */
|
||||
|
||||
int numbuttons;
|
||||
const SDL_MessageBoxButtonData *buttons;
|
||||
|
||||
const SDL_MessageBoxColorScheme *colorScheme; /**< ::SDL_MessageBoxColorScheme, can be NULL to use system settings */
|
||||
} SDL_MessageBoxData;
|
||||
|
||||
/**
|
||||
* \brief Create a modal message box.
|
||||
*
|
||||
* \param messageboxdata The SDL_MessageBoxData structure with title, text, etc.
|
||||
* \param buttonid The pointer to which user id of hit button should be copied.
|
||||
*
|
||||
* \return -1 on error, otherwise 0 and buttonid contains user id of button
|
||||
* hit or -1 if dialog was closed.
|
||||
*
|
||||
* \note This function should be called on the thread that created the parent
|
||||
* window, or on the main thread if the messagebox has no parent. It will
|
||||
* block execution of that thread until the user clicks a button or
|
||||
* closes the messagebox.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid);
|
||||
|
||||
/**
|
||||
* \brief Create a simple modal message box
|
||||
*
|
||||
* \param flags ::SDL_MessageBoxFlags
|
||||
* \param title UTF-8 title text
|
||||
* \param message UTF-8 message text
|
||||
* \param window The parent window, or NULL for no parent
|
||||
*
|
||||
* \return 0 on success, -1 on error
|
||||
*
|
||||
* \sa SDL_ShowMessageBox
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *message, SDL_Window *window);
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_messagebox_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,224 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_mouse.h
|
||||
*
|
||||
* Include file for SDL mouse event handling.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_mouse_h
|
||||
#define _SDL_mouse_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_video.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct SDL_Cursor SDL_Cursor; /* Implementation dependent */
|
||||
|
||||
/**
|
||||
* \brief Cursor types for SDL_CreateSystemCursor.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_SYSTEM_CURSOR_ARROW, /**< Arrow */
|
||||
SDL_SYSTEM_CURSOR_IBEAM, /**< I-beam */
|
||||
SDL_SYSTEM_CURSOR_WAIT, /**< Wait */
|
||||
SDL_SYSTEM_CURSOR_CROSSHAIR, /**< Crosshair */
|
||||
SDL_SYSTEM_CURSOR_WAITARROW, /**< Small wait cursor (or Wait if not available) */
|
||||
SDL_SYSTEM_CURSOR_SIZENWSE, /**< Double arrow pointing northwest and southeast */
|
||||
SDL_SYSTEM_CURSOR_SIZENESW, /**< Double arrow pointing northeast and southwest */
|
||||
SDL_SYSTEM_CURSOR_SIZEWE, /**< Double arrow pointing west and east */
|
||||
SDL_SYSTEM_CURSOR_SIZENS, /**< Double arrow pointing north and south */
|
||||
SDL_SYSTEM_CURSOR_SIZEALL, /**< Four pointed arrow pointing north, south, east, and west */
|
||||
SDL_SYSTEM_CURSOR_NO, /**< Slashed circle or crossbones */
|
||||
SDL_SYSTEM_CURSOR_HAND, /**< Hand */
|
||||
SDL_NUM_SYSTEM_CURSORS
|
||||
} SDL_SystemCursor;
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/**
|
||||
* \brief Get the window which currently has mouse focus.
|
||||
*/
|
||||
extern DECLSPEC SDL_Window * SDLCALL SDL_GetMouseFocus(void);
|
||||
|
||||
/**
|
||||
* \brief Retrieve the current state of the mouse.
|
||||
*
|
||||
* The current button state is returned as a button bitmask, which can
|
||||
* be tested using the SDL_BUTTON(X) macros, and x and y are set to the
|
||||
* mouse cursor position relative to the focus window for the currently
|
||||
* selected mouse. You can pass NULL for either x or y.
|
||||
*/
|
||||
extern DECLSPEC Uint32 SDLCALL SDL_GetMouseState(int *x, int *y);
|
||||
|
||||
/**
|
||||
* \brief Retrieve the relative state of the mouse.
|
||||
*
|
||||
* The current button state is returned as a button bitmask, which can
|
||||
* be tested using the SDL_BUTTON(X) macros, and x and y are set to the
|
||||
* mouse deltas since the last call to SDL_GetRelativeMouseState().
|
||||
*/
|
||||
extern DECLSPEC Uint32 SDLCALL SDL_GetRelativeMouseState(int *x, int *y);
|
||||
|
||||
/**
|
||||
* \brief Moves the mouse to the given position within the window.
|
||||
*
|
||||
* \param window The window to move the mouse into, or NULL for the current mouse focus
|
||||
* \param x The x coordinate within the window
|
||||
* \param y The y coordinate within the window
|
||||
*
|
||||
* \note This function generates a mouse motion event
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window * window,
|
||||
int x, int y);
|
||||
|
||||
/**
|
||||
* \brief Set relative mouse mode.
|
||||
*
|
||||
* \param enabled Whether or not to enable relative mode
|
||||
*
|
||||
* \return 0 on success, or -1 if relative mode is not supported.
|
||||
*
|
||||
* While the mouse is in relative mode, the cursor is hidden, and the
|
||||
* driver will try to report continuous motion in the current window.
|
||||
* Only relative motion events will be delivered, the mouse position
|
||||
* will not change.
|
||||
*
|
||||
* \note This function will flush any pending mouse motion.
|
||||
*
|
||||
* \sa SDL_GetRelativeMouseMode()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled);
|
||||
|
||||
/**
|
||||
* \brief Query whether relative mouse mode is enabled.
|
||||
*
|
||||
* \sa SDL_SetRelativeMouseMode()
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(void);
|
||||
|
||||
/**
|
||||
* \brief Create a cursor, using the specified bitmap data and
|
||||
* mask (in MSB format).
|
||||
*
|
||||
* The cursor width must be a multiple of 8 bits.
|
||||
*
|
||||
* The cursor is created in black and white according to the following:
|
||||
* <table>
|
||||
* <tr><td> data </td><td> mask </td><td> resulting pixel on screen </td></tr>
|
||||
* <tr><td> 0 </td><td> 1 </td><td> White </td></tr>
|
||||
* <tr><td> 1 </td><td> 1 </td><td> Black </td></tr>
|
||||
* <tr><td> 0 </td><td> 0 </td><td> Transparent </td></tr>
|
||||
* <tr><td> 1 </td><td> 0 </td><td> Inverted color if possible, black
|
||||
* if not. </td></tr>
|
||||
* </table>
|
||||
*
|
||||
* \sa SDL_FreeCursor()
|
||||
*/
|
||||
extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor(const Uint8 * data,
|
||||
const Uint8 * mask,
|
||||
int w, int h, int hot_x,
|
||||
int hot_y);
|
||||
|
||||
/**
|
||||
* \brief Create a color cursor.
|
||||
*
|
||||
* \sa SDL_FreeCursor()
|
||||
*/
|
||||
extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateColorCursor(SDL_Surface *surface,
|
||||
int hot_x,
|
||||
int hot_y);
|
||||
|
||||
/**
|
||||
* \brief Create a system cursor.
|
||||
*
|
||||
* \sa SDL_FreeCursor()
|
||||
*/
|
||||
extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateSystemCursor(SDL_SystemCursor id);
|
||||
|
||||
/**
|
||||
* \brief Set the active cursor.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor * cursor);
|
||||
|
||||
/**
|
||||
* \brief Return the active cursor.
|
||||
*/
|
||||
extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void);
|
||||
|
||||
/**
|
||||
* \brief Return the default cursor.
|
||||
*/
|
||||
extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetDefaultCursor(void);
|
||||
|
||||
/**
|
||||
* \brief Frees a cursor created with SDL_CreateCursor().
|
||||
*
|
||||
* \sa SDL_CreateCursor()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor);
|
||||
|
||||
/**
|
||||
* \brief Toggle whether or not the cursor is shown.
|
||||
*
|
||||
* \param toggle 1 to show the cursor, 0 to hide it, -1 to query the current
|
||||
* state.
|
||||
*
|
||||
* \return 1 if the cursor is shown, or 0 if the cursor is hidden.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle);
|
||||
|
||||
/**
|
||||
* Used as a mask when testing buttons in buttonstate.
|
||||
* - Button 1: Left mouse button
|
||||
* - Button 2: Middle mouse button
|
||||
* - Button 3: Right mouse button
|
||||
*/
|
||||
#define SDL_BUTTON(X) (1 << ((X)-1))
|
||||
#define SDL_BUTTON_LEFT 1
|
||||
#define SDL_BUTTON_MIDDLE 2
|
||||
#define SDL_BUTTON_RIGHT 3
|
||||
#define SDL_BUTTON_X1 4
|
||||
#define SDL_BUTTON_X2 5
|
||||
#define SDL_BUTTON_LMASK SDL_BUTTON(SDL_BUTTON_LEFT)
|
||||
#define SDL_BUTTON_MMASK SDL_BUTTON(SDL_BUTTON_MIDDLE)
|
||||
#define SDL_BUTTON_RMASK SDL_BUTTON(SDL_BUTTON_RIGHT)
|
||||
#define SDL_BUTTON_X1MASK SDL_BUTTON(SDL_BUTTON_X1)
|
||||
#define SDL_BUTTON_X2MASK SDL_BUTTON(SDL_BUTTON_X2)
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_mouse_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,251 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_mutex_h
|
||||
#define _SDL_mutex_h
|
||||
|
||||
/**
|
||||
* \file SDL_mutex.h
|
||||
*
|
||||
* Functions to provide thread synchronization primitives.
|
||||
*/
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Synchronization functions which can time out return this value
|
||||
* if they time out.
|
||||
*/
|
||||
#define SDL_MUTEX_TIMEDOUT 1
|
||||
|
||||
/**
|
||||
* This is the timeout value which corresponds to never time out.
|
||||
*/
|
||||
#define SDL_MUTEX_MAXWAIT (~(Uint32)0)
|
||||
|
||||
|
||||
/**
|
||||
* \name Mutex functions
|
||||
*/
|
||||
/* @{ */
|
||||
|
||||
/* The SDL mutex structure, defined in SDL_sysmutex.c */
|
||||
struct SDL_mutex;
|
||||
typedef struct SDL_mutex SDL_mutex;
|
||||
|
||||
/**
|
||||
* Create a mutex, initialized unlocked.
|
||||
*/
|
||||
extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex(void);
|
||||
|
||||
/**
|
||||
* Lock the mutex.
|
||||
*
|
||||
* \return 0, or -1 on error.
|
||||
*/
|
||||
#define SDL_mutexP(m) SDL_LockMutex(m)
|
||||
extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex);
|
||||
|
||||
/**
|
||||
* Try to lock the mutex
|
||||
*
|
||||
* \return 0, SDL_MUTEX_TIMEDOUT, or -1 on error
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex);
|
||||
|
||||
/**
|
||||
* Unlock the mutex.
|
||||
*
|
||||
* \return 0, or -1 on error.
|
||||
*
|
||||
* \warning It is an error to unlock a mutex that has not been locked by
|
||||
* the current thread, and doing so results in undefined behavior.
|
||||
*/
|
||||
#define SDL_mutexV(m) SDL_UnlockMutex(m)
|
||||
extern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex);
|
||||
|
||||
/**
|
||||
* Destroy a mutex.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_DestroyMutex(SDL_mutex * mutex);
|
||||
|
||||
/* @} *//* Mutex functions */
|
||||
|
||||
|
||||
/**
|
||||
* \name Semaphore functions
|
||||
*/
|
||||
/* @{ */
|
||||
|
||||
/* The SDL semaphore structure, defined in SDL_syssem.c */
|
||||
struct SDL_semaphore;
|
||||
typedef struct SDL_semaphore SDL_sem;
|
||||
|
||||
/**
|
||||
* Create a semaphore, initialized with value, returns NULL on failure.
|
||||
*/
|
||||
extern DECLSPEC SDL_sem *SDLCALL SDL_CreateSemaphore(Uint32 initial_value);
|
||||
|
||||
/**
|
||||
* Destroy a semaphore.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_sem * sem);
|
||||
|
||||
/**
|
||||
* This function suspends the calling thread until the semaphore pointed
|
||||
* to by \c sem has a positive count. It then atomically decreases the
|
||||
* semaphore count.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SemWait(SDL_sem * sem);
|
||||
|
||||
/**
|
||||
* Non-blocking variant of SDL_SemWait().
|
||||
*
|
||||
* \return 0 if the wait succeeds, ::SDL_MUTEX_TIMEDOUT if the wait would
|
||||
* block, and -1 on error.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem);
|
||||
|
||||
/**
|
||||
* Variant of SDL_SemWait() with a timeout in milliseconds.
|
||||
*
|
||||
* \return 0 if the wait succeeds, ::SDL_MUTEX_TIMEDOUT if the wait does not
|
||||
* succeed in the allotted time, and -1 on error.
|
||||
*
|
||||
* \warning On some platforms this function is implemented by looping with a
|
||||
* delay of 1 ms, and so should be avoided if possible.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms);
|
||||
|
||||
/**
|
||||
* Atomically increases the semaphore's count (not blocking).
|
||||
*
|
||||
* \return 0, or -1 on error.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SemPost(SDL_sem * sem);
|
||||
|
||||
/**
|
||||
* Returns the current count of the semaphore.
|
||||
*/
|
||||
extern DECLSPEC Uint32 SDLCALL SDL_SemValue(SDL_sem * sem);
|
||||
|
||||
/* @} *//* Semaphore functions */
|
||||
|
||||
|
||||
/**
|
||||
* \name Condition variable functions
|
||||
*/
|
||||
/* @{ */
|
||||
|
||||
/* The SDL condition variable structure, defined in SDL_syscond.c */
|
||||
struct SDL_cond;
|
||||
typedef struct SDL_cond SDL_cond;
|
||||
|
||||
/**
|
||||
* Create a condition variable.
|
||||
*
|
||||
* Typical use of condition variables:
|
||||
*
|
||||
* Thread A:
|
||||
* SDL_LockMutex(lock);
|
||||
* while ( ! condition ) {
|
||||
* SDL_CondWait(cond, lock);
|
||||
* }
|
||||
* SDL_UnlockMutex(lock);
|
||||
*
|
||||
* Thread B:
|
||||
* SDL_LockMutex(lock);
|
||||
* ...
|
||||
* condition = true;
|
||||
* ...
|
||||
* SDL_CondSignal(cond);
|
||||
* SDL_UnlockMutex(lock);
|
||||
*
|
||||
* There is some discussion whether to signal the condition variable
|
||||
* with the mutex locked or not. There is some potential performance
|
||||
* benefit to unlocking first on some platforms, but there are some
|
||||
* potential race conditions depending on how your code is structured.
|
||||
*
|
||||
* In general it's safer to signal the condition variable while the
|
||||
* mutex is locked.
|
||||
*/
|
||||
extern DECLSPEC SDL_cond *SDLCALL SDL_CreateCond(void);
|
||||
|
||||
/**
|
||||
* Destroy a condition variable.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_DestroyCond(SDL_cond * cond);
|
||||
|
||||
/**
|
||||
* Restart one of the threads that are waiting on the condition variable.
|
||||
*
|
||||
* \return 0 or -1 on error.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_CondSignal(SDL_cond * cond);
|
||||
|
||||
/**
|
||||
* Restart all threads that are waiting on the condition variable.
|
||||
*
|
||||
* \return 0 or -1 on error.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_CondBroadcast(SDL_cond * cond);
|
||||
|
||||
/**
|
||||
* Wait on the condition variable, unlocking the provided mutex.
|
||||
*
|
||||
* \warning The mutex must be locked before entering this function!
|
||||
*
|
||||
* The mutex is re-locked once the condition variable is signaled.
|
||||
*
|
||||
* \return 0 when it is signaled, or -1 on error.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_CondWait(SDL_cond * cond, SDL_mutex * mutex);
|
||||
|
||||
/**
|
||||
* Waits for at most \c ms milliseconds, and returns 0 if the condition
|
||||
* variable is signaled, ::SDL_MUTEX_TIMEDOUT if the condition is not
|
||||
* signaled in the allotted time, and -1 on error.
|
||||
*
|
||||
* \warning On some platforms this function is implemented by looping with a
|
||||
* delay of 1 ms, and so should be avoided if possible.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_CondWaitTimeout(SDL_cond * cond,
|
||||
SDL_mutex * mutex, Uint32 ms);
|
||||
|
||||
/* @} *//* Condition variable functions */
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_mutex_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDLname_h_
|
||||
#define _SDLname_h_
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
#define NeedFunctionPrototypes 1
|
||||
#endif
|
||||
|
||||
#define SDL_NAME(X) SDL_##X
|
||||
|
||||
#endif /* _SDLname_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_opengles.h
|
||||
*
|
||||
* This is a simple file to encapsulate the OpenGL ES 1.X API headers.
|
||||
*/
|
||||
|
||||
#ifdef __IPHONEOS__
|
||||
#include <OpenGLES/ES1/gl.h>
|
||||
#include <OpenGLES/ES1/glext.h>
|
||||
#else
|
||||
#include <GLES/gl.h>
|
||||
#include <GLES/glext.h>
|
||||
#endif
|
||||
|
||||
#ifndef APIENTRY
|
||||
#define APIENTRY
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,429 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_pixels.h
|
||||
*
|
||||
* Header for the enumerated pixel format definitions.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_pixels_h
|
||||
#define _SDL_pixels_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \name Transparency definitions
|
||||
*
|
||||
* These define alpha as the opacity of a surface.
|
||||
*/
|
||||
/* @{ */
|
||||
#define SDL_ALPHA_OPAQUE 255
|
||||
#define SDL_ALPHA_TRANSPARENT 0
|
||||
/* @} */
|
||||
|
||||
/** Pixel type. */
|
||||
enum
|
||||
{
|
||||
SDL_PIXELTYPE_UNKNOWN,
|
||||
SDL_PIXELTYPE_INDEX1,
|
||||
SDL_PIXELTYPE_INDEX4,
|
||||
SDL_PIXELTYPE_INDEX8,
|
||||
SDL_PIXELTYPE_PACKED8,
|
||||
SDL_PIXELTYPE_PACKED16,
|
||||
SDL_PIXELTYPE_PACKED32,
|
||||
SDL_PIXELTYPE_ARRAYU8,
|
||||
SDL_PIXELTYPE_ARRAYU16,
|
||||
SDL_PIXELTYPE_ARRAYU32,
|
||||
SDL_PIXELTYPE_ARRAYF16,
|
||||
SDL_PIXELTYPE_ARRAYF32
|
||||
};
|
||||
|
||||
/** Bitmap pixel order, high bit -> low bit. */
|
||||
enum
|
||||
{
|
||||
SDL_BITMAPORDER_NONE,
|
||||
SDL_BITMAPORDER_4321,
|
||||
SDL_BITMAPORDER_1234
|
||||
};
|
||||
|
||||
/** Packed component order, high bit -> low bit. */
|
||||
enum
|
||||
{
|
||||
SDL_PACKEDORDER_NONE,
|
||||
SDL_PACKEDORDER_XRGB,
|
||||
SDL_PACKEDORDER_RGBX,
|
||||
SDL_PACKEDORDER_ARGB,
|
||||
SDL_PACKEDORDER_RGBA,
|
||||
SDL_PACKEDORDER_XBGR,
|
||||
SDL_PACKEDORDER_BGRX,
|
||||
SDL_PACKEDORDER_ABGR,
|
||||
SDL_PACKEDORDER_BGRA
|
||||
};
|
||||
|
||||
/** Array component order, low byte -> high byte. */
|
||||
enum
|
||||
{
|
||||
SDL_ARRAYORDER_NONE,
|
||||
SDL_ARRAYORDER_RGB,
|
||||
SDL_ARRAYORDER_RGBA,
|
||||
SDL_ARRAYORDER_ARGB,
|
||||
SDL_ARRAYORDER_BGR,
|
||||
SDL_ARRAYORDER_BGRA,
|
||||
SDL_ARRAYORDER_ABGR
|
||||
};
|
||||
|
||||
/** Packed component layout. */
|
||||
enum
|
||||
{
|
||||
SDL_PACKEDLAYOUT_NONE,
|
||||
SDL_PACKEDLAYOUT_332,
|
||||
SDL_PACKEDLAYOUT_4444,
|
||||
SDL_PACKEDLAYOUT_1555,
|
||||
SDL_PACKEDLAYOUT_5551,
|
||||
SDL_PACKEDLAYOUT_565,
|
||||
SDL_PACKEDLAYOUT_8888,
|
||||
SDL_PACKEDLAYOUT_2101010,
|
||||
SDL_PACKEDLAYOUT_1010102
|
||||
};
|
||||
|
||||
#define SDL_DEFINE_PIXELFOURCC(A, B, C, D) SDL_FOURCC(A, B, C, D)
|
||||
|
||||
#define SDL_DEFINE_PIXELFORMAT(type, order, layout, bits, bytes) \
|
||||
((1 << 28) | ((type) << 24) | ((order) << 20) | ((layout) << 16) | \
|
||||
((bits) << 8) | ((bytes) << 0))
|
||||
|
||||
#define SDL_PIXELFLAG(X) (((X) >> 28) & 0x0F)
|
||||
#define SDL_PIXELTYPE(X) (((X) >> 24) & 0x0F)
|
||||
#define SDL_PIXELORDER(X) (((X) >> 20) & 0x0F)
|
||||
#define SDL_PIXELLAYOUT(X) (((X) >> 16) & 0x0F)
|
||||
#define SDL_BITSPERPIXEL(X) (((X) >> 8) & 0xFF)
|
||||
#define SDL_BYTESPERPIXEL(X) \
|
||||
(SDL_ISPIXELFORMAT_FOURCC(X) ? \
|
||||
((((X) == SDL_PIXELFORMAT_YUY2) || \
|
||||
((X) == SDL_PIXELFORMAT_UYVY) || \
|
||||
((X) == SDL_PIXELFORMAT_YVYU)) ? 2 : 1) : (((X) >> 0) & 0xFF))
|
||||
|
||||
#define SDL_ISPIXELFORMAT_INDEXED(format) \
|
||||
(!SDL_ISPIXELFORMAT_FOURCC(format) && \
|
||||
((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX1) || \
|
||||
(SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX4) || \
|
||||
(SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX8)))
|
||||
|
||||
#define SDL_ISPIXELFORMAT_ALPHA(format) \
|
||||
(!SDL_ISPIXELFORMAT_FOURCC(format) && \
|
||||
((SDL_PIXELORDER(format) == SDL_PACKEDORDER_ARGB) || \
|
||||
(SDL_PIXELORDER(format) == SDL_PACKEDORDER_RGBA) || \
|
||||
(SDL_PIXELORDER(format) == SDL_PACKEDORDER_ABGR) || \
|
||||
(SDL_PIXELORDER(format) == SDL_PACKEDORDER_BGRA)))
|
||||
|
||||
/* The flag is set to 1 because 0x1? is not in the printable ASCII range */
|
||||
#define SDL_ISPIXELFORMAT_FOURCC(format) \
|
||||
((format) && (SDL_PIXELFLAG(format) != 1))
|
||||
|
||||
/* Note: If you modify this list, update SDL_GetPixelFormatName() */
|
||||
enum
|
||||
{
|
||||
SDL_PIXELFORMAT_UNKNOWN,
|
||||
SDL_PIXELFORMAT_INDEX1LSB =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1, SDL_BITMAPORDER_4321, 0,
|
||||
1, 0),
|
||||
SDL_PIXELFORMAT_INDEX1MSB =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1, SDL_BITMAPORDER_1234, 0,
|
||||
1, 0),
|
||||
SDL_PIXELFORMAT_INDEX4LSB =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4, SDL_BITMAPORDER_4321, 0,
|
||||
4, 0),
|
||||
SDL_PIXELFORMAT_INDEX4MSB =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4, SDL_BITMAPORDER_1234, 0,
|
||||
4, 0),
|
||||
SDL_PIXELFORMAT_INDEX8 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX8, 0, 0, 8, 1),
|
||||
SDL_PIXELFORMAT_RGB332 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED8, SDL_PACKEDORDER_XRGB,
|
||||
SDL_PACKEDLAYOUT_332, 8, 1),
|
||||
SDL_PIXELFORMAT_RGB444 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
|
||||
SDL_PACKEDLAYOUT_4444, 12, 2),
|
||||
SDL_PIXELFORMAT_RGB555 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
|
||||
SDL_PACKEDLAYOUT_1555, 15, 2),
|
||||
SDL_PIXELFORMAT_BGR555 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
|
||||
SDL_PACKEDLAYOUT_1555, 15, 2),
|
||||
SDL_PIXELFORMAT_ARGB4444 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB,
|
||||
SDL_PACKEDLAYOUT_4444, 16, 2),
|
||||
SDL_PIXELFORMAT_RGBA4444 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_RGBA,
|
||||
SDL_PACKEDLAYOUT_4444, 16, 2),
|
||||
SDL_PIXELFORMAT_ABGR4444 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ABGR,
|
||||
SDL_PACKEDLAYOUT_4444, 16, 2),
|
||||
SDL_PIXELFORMAT_BGRA4444 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_BGRA,
|
||||
SDL_PACKEDLAYOUT_4444, 16, 2),
|
||||
SDL_PIXELFORMAT_ARGB1555 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB,
|
||||
SDL_PACKEDLAYOUT_1555, 16, 2),
|
||||
SDL_PIXELFORMAT_RGBA5551 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_RGBA,
|
||||
SDL_PACKEDLAYOUT_5551, 16, 2),
|
||||
SDL_PIXELFORMAT_ABGR1555 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ABGR,
|
||||
SDL_PACKEDLAYOUT_1555, 16, 2),
|
||||
SDL_PIXELFORMAT_BGRA5551 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_BGRA,
|
||||
SDL_PACKEDLAYOUT_5551, 16, 2),
|
||||
SDL_PIXELFORMAT_RGB565 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
|
||||
SDL_PACKEDLAYOUT_565, 16, 2),
|
||||
SDL_PIXELFORMAT_BGR565 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
|
||||
SDL_PACKEDLAYOUT_565, 16, 2),
|
||||
SDL_PIXELFORMAT_RGB24 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_RGB, 0,
|
||||
24, 3),
|
||||
SDL_PIXELFORMAT_BGR24 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_BGR, 0,
|
||||
24, 3),
|
||||
SDL_PIXELFORMAT_RGB888 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XRGB,
|
||||
SDL_PACKEDLAYOUT_8888, 24, 4),
|
||||
SDL_PIXELFORMAT_RGBX8888 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBX,
|
||||
SDL_PACKEDLAYOUT_8888, 24, 4),
|
||||
SDL_PIXELFORMAT_BGR888 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XBGR,
|
||||
SDL_PACKEDLAYOUT_8888, 24, 4),
|
||||
SDL_PIXELFORMAT_BGRX8888 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRX,
|
||||
SDL_PACKEDLAYOUT_8888, 24, 4),
|
||||
SDL_PIXELFORMAT_ARGB8888 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,
|
||||
SDL_PACKEDLAYOUT_8888, 32, 4),
|
||||
SDL_PIXELFORMAT_RGBA8888 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBA,
|
||||
SDL_PACKEDLAYOUT_8888, 32, 4),
|
||||
SDL_PIXELFORMAT_ABGR8888 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ABGR,
|
||||
SDL_PACKEDLAYOUT_8888, 32, 4),
|
||||
SDL_PIXELFORMAT_BGRA8888 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRA,
|
||||
SDL_PACKEDLAYOUT_8888, 32, 4),
|
||||
SDL_PIXELFORMAT_ARGB2101010 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,
|
||||
SDL_PACKEDLAYOUT_2101010, 32, 4),
|
||||
|
||||
SDL_PIXELFORMAT_YV12 = /**< Planar mode: Y + V + U (3 planes) */
|
||||
SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2'),
|
||||
SDL_PIXELFORMAT_IYUV = /**< Planar mode: Y + U + V (3 planes) */
|
||||
SDL_DEFINE_PIXELFOURCC('I', 'Y', 'U', 'V'),
|
||||
SDL_PIXELFORMAT_YUY2 = /**< Packed mode: Y0+U0+Y1+V0 (1 plane) */
|
||||
SDL_DEFINE_PIXELFOURCC('Y', 'U', 'Y', '2'),
|
||||
SDL_PIXELFORMAT_UYVY = /**< Packed mode: U0+Y0+V0+Y1 (1 plane) */
|
||||
SDL_DEFINE_PIXELFOURCC('U', 'Y', 'V', 'Y'),
|
||||
SDL_PIXELFORMAT_YVYU = /**< Packed mode: Y0+V0+Y1+U0 (1 plane) */
|
||||
SDL_DEFINE_PIXELFOURCC('Y', 'V', 'Y', 'U')
|
||||
};
|
||||
|
||||
typedef struct SDL_Color
|
||||
{
|
||||
Uint8 r;
|
||||
Uint8 g;
|
||||
Uint8 b;
|
||||
Uint8 a;
|
||||
} SDL_Color;
|
||||
#define SDL_Colour SDL_Color
|
||||
|
||||
typedef struct SDL_Palette
|
||||
{
|
||||
int ncolors;
|
||||
SDL_Color *colors;
|
||||
Uint32 version;
|
||||
int refcount;
|
||||
} SDL_Palette;
|
||||
|
||||
/**
|
||||
* \note Everything in the pixel format structure is read-only.
|
||||
*/
|
||||
typedef struct SDL_PixelFormat
|
||||
{
|
||||
Uint32 format;
|
||||
SDL_Palette *palette;
|
||||
Uint8 BitsPerPixel;
|
||||
Uint8 BytesPerPixel;
|
||||
Uint8 padding[2];
|
||||
Uint32 Rmask;
|
||||
Uint32 Gmask;
|
||||
Uint32 Bmask;
|
||||
Uint32 Amask;
|
||||
Uint8 Rloss;
|
||||
Uint8 Gloss;
|
||||
Uint8 Bloss;
|
||||
Uint8 Aloss;
|
||||
Uint8 Rshift;
|
||||
Uint8 Gshift;
|
||||
Uint8 Bshift;
|
||||
Uint8 Ashift;
|
||||
int refcount;
|
||||
struct SDL_PixelFormat *next;
|
||||
} SDL_PixelFormat;
|
||||
|
||||
/**
|
||||
* \brief Get the human readable name of a pixel format
|
||||
*/
|
||||
extern DECLSPEC const char* SDLCALL SDL_GetPixelFormatName(Uint32 format);
|
||||
|
||||
/**
|
||||
* \brief Convert one of the enumerated pixel formats to a bpp and RGBA masks.
|
||||
*
|
||||
* \return SDL_TRUE, or SDL_FALSE if the conversion wasn't possible.
|
||||
*
|
||||
* \sa SDL_MasksToPixelFormatEnum()
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_PixelFormatEnumToMasks(Uint32 format,
|
||||
int *bpp,
|
||||
Uint32 * Rmask,
|
||||
Uint32 * Gmask,
|
||||
Uint32 * Bmask,
|
||||
Uint32 * Amask);
|
||||
|
||||
/**
|
||||
* \brief Convert a bpp and RGBA masks to an enumerated pixel format.
|
||||
*
|
||||
* \return The pixel format, or ::SDL_PIXELFORMAT_UNKNOWN if the conversion
|
||||
* wasn't possible.
|
||||
*
|
||||
* \sa SDL_PixelFormatEnumToMasks()
|
||||
*/
|
||||
extern DECLSPEC Uint32 SDLCALL SDL_MasksToPixelFormatEnum(int bpp,
|
||||
Uint32 Rmask,
|
||||
Uint32 Gmask,
|
||||
Uint32 Bmask,
|
||||
Uint32 Amask);
|
||||
|
||||
/**
|
||||
* \brief Create an SDL_PixelFormat structure from a pixel format enum.
|
||||
*/
|
||||
extern DECLSPEC SDL_PixelFormat * SDLCALL SDL_AllocFormat(Uint32 pixel_format);
|
||||
|
||||
/**
|
||||
* \brief Free an SDL_PixelFormat structure.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_FreeFormat(SDL_PixelFormat *format);
|
||||
|
||||
/**
|
||||
* \brief Create a palette structure with the specified number of color
|
||||
* entries.
|
||||
*
|
||||
* \return A new palette, or NULL if there wasn't enough memory.
|
||||
*
|
||||
* \note The palette entries are initialized to white.
|
||||
*
|
||||
* \sa SDL_FreePalette()
|
||||
*/
|
||||
extern DECLSPEC SDL_Palette *SDLCALL SDL_AllocPalette(int ncolors);
|
||||
|
||||
/**
|
||||
* \brief Set the palette for a pixel format structure.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetPixelFormatPalette(SDL_PixelFormat * format,
|
||||
SDL_Palette *palette);
|
||||
|
||||
/**
|
||||
* \brief Set a range of colors in a palette.
|
||||
*
|
||||
* \param palette The palette to modify.
|
||||
* \param colors An array of colors to copy into the palette.
|
||||
* \param firstcolor The index of the first palette entry to modify.
|
||||
* \param ncolors The number of entries to modify.
|
||||
*
|
||||
* \return 0 on success, or -1 if not all of the colors could be set.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetPaletteColors(SDL_Palette * palette,
|
||||
const SDL_Color * colors,
|
||||
int firstcolor, int ncolors);
|
||||
|
||||
/**
|
||||
* \brief Free a palette created with SDL_AllocPalette().
|
||||
*
|
||||
* \sa SDL_AllocPalette()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_FreePalette(SDL_Palette * palette);
|
||||
|
||||
/**
|
||||
* \brief Maps an RGB triple to an opaque pixel value for a given pixel format.
|
||||
*
|
||||
* \sa SDL_MapRGBA
|
||||
*/
|
||||
extern DECLSPEC Uint32 SDLCALL SDL_MapRGB(const SDL_PixelFormat * format,
|
||||
Uint8 r, Uint8 g, Uint8 b);
|
||||
|
||||
/**
|
||||
* \brief Maps an RGBA quadruple to a pixel value for a given pixel format.
|
||||
*
|
||||
* \sa SDL_MapRGB
|
||||
*/
|
||||
extern DECLSPEC Uint32 SDLCALL SDL_MapRGBA(const SDL_PixelFormat * format,
|
||||
Uint8 r, Uint8 g, Uint8 b,
|
||||
Uint8 a);
|
||||
|
||||
/**
|
||||
* \brief Get the RGB components from a pixel of the specified format.
|
||||
*
|
||||
* \sa SDL_GetRGBA
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GetRGB(Uint32 pixel,
|
||||
const SDL_PixelFormat * format,
|
||||
Uint8 * r, Uint8 * g, Uint8 * b);
|
||||
|
||||
/**
|
||||
* \brief Get the RGBA components from a pixel of the specified format.
|
||||
*
|
||||
* \sa SDL_GetRGB
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GetRGBA(Uint32 pixel,
|
||||
const SDL_PixelFormat * format,
|
||||
Uint8 * r, Uint8 * g, Uint8 * b,
|
||||
Uint8 * a);
|
||||
|
||||
/**
|
||||
* \brief Calculate a 256 entry gamma ramp for a gamma value.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_CalculateGammaRamp(float gamma, Uint16 * ramp);
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_pixels_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,164 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_platform.h
|
||||
*
|
||||
* Try to get a standard set of platform defines.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_platform_h
|
||||
#define _SDL_platform_h
|
||||
|
||||
#if defined(_AIX)
|
||||
#undef __AIX__
|
||||
#define __AIX__ 1
|
||||
#endif
|
||||
#if defined(__HAIKU__)
|
||||
#undef __HAIKU__
|
||||
#define __HAIKU__ 1
|
||||
#endif
|
||||
#if defined(bsdi) || defined(__bsdi) || defined(__bsdi__)
|
||||
#undef __BSDI__
|
||||
#define __BSDI__ 1
|
||||
#endif
|
||||
#if defined(_arch_dreamcast)
|
||||
#undef __DREAMCAST__
|
||||
#define __DREAMCAST__ 1
|
||||
#endif
|
||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
|
||||
#undef __FREEBSD__
|
||||
#define __FREEBSD__ 1
|
||||
#endif
|
||||
#if defined(hpux) || defined(__hpux) || defined(__hpux__)
|
||||
#undef __HPUX__
|
||||
#define __HPUX__ 1
|
||||
#endif
|
||||
#if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE)
|
||||
#undef __IRIX__
|
||||
#define __IRIX__ 1
|
||||
#endif
|
||||
#if defined(linux) || defined(__linux) || defined(__linux__)
|
||||
#undef __LINUX__
|
||||
#define __LINUX__ 1
|
||||
#endif
|
||||
#if defined(ANDROID) || defined(__ANDROID__)
|
||||
#undef __ANDROID__
|
||||
#undef __LINUX__ /* do we need to do this? */
|
||||
#define __ANDROID__ 1
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__)
|
||||
/* lets us know what version of Mac OS X we're compiling on */
|
||||
#include "AvailabilityMacros.h"
|
||||
#include "TargetConditionals.h"
|
||||
#if TARGET_OS_IPHONE
|
||||
/* if compiling for iPhone */
|
||||
#undef __IPHONEOS__
|
||||
#define __IPHONEOS__ 1
|
||||
#undef __MACOSX__
|
||||
#else
|
||||
/* if not compiling for iPhone */
|
||||
#undef __MACOSX__
|
||||
#define __MACOSX__ 1
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
|
||||
# error SDL for Mac OS X only supports deploying on 10.5 and above.
|
||||
#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1050 */
|
||||
#endif /* TARGET_OS_IPHONE */
|
||||
#endif /* defined(__APPLE__) */
|
||||
|
||||
#if defined(__NetBSD__)
|
||||
#undef __NETBSD__
|
||||
#define __NETBSD__ 1
|
||||
#endif
|
||||
#if defined(__OpenBSD__)
|
||||
#undef __OPENBSD__
|
||||
#define __OPENBSD__ 1
|
||||
#endif
|
||||
#if defined(__OS2__)
|
||||
#undef __OS2__
|
||||
#define __OS2__ 1
|
||||
#endif
|
||||
#if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE)
|
||||
#undef __OSF__
|
||||
#define __OSF__ 1
|
||||
#endif
|
||||
#if defined(__QNXNTO__)
|
||||
#undef __QNXNTO__
|
||||
#define __QNXNTO__ 1
|
||||
#endif
|
||||
#if defined(riscos) || defined(__riscos) || defined(__riscos__)
|
||||
#undef __RISCOS__
|
||||
#define __RISCOS__ 1
|
||||
#endif
|
||||
#if defined(__SVR4)
|
||||
#undef __SOLARIS__
|
||||
#define __SOLARIS__ 1
|
||||
#endif
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
|
||||
/* Try to find out if we're compiling for WinRT or non-WinRT */
|
||||
/* If _USING_V110_SDK71_ is defined it means we are using the v110_xp or v120_xp toolset. */
|
||||
#if defined(__MINGW32__) || (defined(_MSC_VER) && (_MSC_VER >= 1700) && !_USING_V110_SDK71_) /* _MSC_VER==1700 for MSVC 2012 */
|
||||
#include <winapifamily.h>
|
||||
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
||||
#undef __WINDOWS__
|
||||
#define __WINDOWS__ 1
|
||||
/* See if we're compiling for WinRT: */
|
||||
#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
|
||||
#undef __WINRT__
|
||||
#define __WINRT__ 1
|
||||
#endif
|
||||
#else
|
||||
#undef __WINDOWS__
|
||||
#define __WINDOWS__ 1
|
||||
#endif /* _MSC_VER < 1700 */
|
||||
#endif /* defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) */
|
||||
|
||||
#if defined(__WINDOWS__)
|
||||
#undef __WIN32__
|
||||
#define __WIN32__ 1
|
||||
#endif
|
||||
#if defined(__PSP__)
|
||||
#undef __PSP__
|
||||
#define __PSP__ 1
|
||||
#endif
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Gets the name of the platform.
|
||||
*/
|
||||
extern DECLSPEC const char * SDLCALL SDL_GetPlatform (void);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_platform_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_power_h
|
||||
#define _SDL_power_h
|
||||
|
||||
/**
|
||||
* \file SDL_power.h
|
||||
*
|
||||
* Header for the SDL power management routines.
|
||||
*/
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief The basic state for the system's power supply.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_POWERSTATE_UNKNOWN, /**< cannot determine power status */
|
||||
SDL_POWERSTATE_ON_BATTERY, /**< Not plugged in, running on the battery */
|
||||
SDL_POWERSTATE_NO_BATTERY, /**< Plugged in, no battery available */
|
||||
SDL_POWERSTATE_CHARGING, /**< Plugged in, charging battery */
|
||||
SDL_POWERSTATE_CHARGED /**< Plugged in, battery charged */
|
||||
} SDL_PowerState;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Get the current power supply details.
|
||||
*
|
||||
* \param secs Seconds of battery life left. You can pass a NULL here if
|
||||
* you don't care. Will return -1 if we can't determine a
|
||||
* value, or we're not running on a battery.
|
||||
*
|
||||
* \param pct Percentage of battery life left, between 0 and 100. You can
|
||||
* pass a NULL here if you don't care. Will return -1 if we
|
||||
* can't determine a value, or we're not running on a battery.
|
||||
*
|
||||
* \return The state of the battery (if any).
|
||||
*/
|
||||
extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *secs, int *pct);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_power_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_quit.h
|
||||
*
|
||||
* Include file for SDL quit event handling.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_quit_h
|
||||
#define _SDL_quit_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
|
||||
/**
|
||||
* \file SDL_quit.h
|
||||
*
|
||||
* An ::SDL_QUIT event is generated when the user tries to close the application
|
||||
* window. If it is ignored or filtered out, the window will remain open.
|
||||
* If it is not ignored or filtered, it is queued normally and the window
|
||||
* is allowed to close. When the window is closed, screen updates will
|
||||
* complete, but have no effect.
|
||||
*
|
||||
* SDL_Init() installs signal handlers for SIGINT (keyboard interrupt)
|
||||
* and SIGTERM (system termination request), if handlers do not already
|
||||
* exist, that generate ::SDL_QUIT events as well. There is no way
|
||||
* to determine the cause of an ::SDL_QUIT event, but setting a signal
|
||||
* handler in your application will override the default generation of
|
||||
* quit events for that signal.
|
||||
*
|
||||
* \sa SDL_Quit()
|
||||
*/
|
||||
|
||||
/* There are no functions directly affecting the quit event */
|
||||
|
||||
#define SDL_QuitRequested() \
|
||||
(SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUIT,SDL_QUIT) > 0))
|
||||
|
||||
#endif /* _SDL_quit_h */
|
|
@ -0,0 +1,138 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_rect.h
|
||||
*
|
||||
* Header file for SDL_rect definition and management functions.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_rect_h
|
||||
#define _SDL_rect_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_pixels.h"
|
||||
#include "SDL_rwops.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief The structure that defines a point
|
||||
*
|
||||
* \sa SDL_EnclosePoints
|
||||
*/
|
||||
typedef struct SDL_Point
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
} SDL_Point;
|
||||
|
||||
/**
|
||||
* \brief A rectangle, with the origin at the upper left.
|
||||
*
|
||||
* \sa SDL_RectEmpty
|
||||
* \sa SDL_RectEquals
|
||||
* \sa SDL_HasIntersection
|
||||
* \sa SDL_IntersectRect
|
||||
* \sa SDL_UnionRect
|
||||
* \sa SDL_EnclosePoints
|
||||
*/
|
||||
typedef struct SDL_Rect
|
||||
{
|
||||
int x, y;
|
||||
int w, h;
|
||||
} SDL_Rect;
|
||||
|
||||
/**
|
||||
* \brief Returns true if the rectangle has no area.
|
||||
*/
|
||||
SDL_FORCE_INLINE SDL_bool SDL_RectEmpty(const SDL_Rect *r)
|
||||
{
|
||||
return ((!r) || (r->w <= 0) || (r->h <= 0)) ? SDL_TRUE : SDL_FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Returns true if the two rectangles are equal.
|
||||
*/
|
||||
SDL_FORCE_INLINE SDL_bool SDL_RectEquals(const SDL_Rect *a, const SDL_Rect *b)
|
||||
{
|
||||
return (a && b && (a->x == b->x) && (a->y == b->y) &&
|
||||
(a->w == b->w) && (a->h == b->h)) ? SDL_TRUE : SDL_FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Determine whether two rectangles intersect.
|
||||
*
|
||||
* \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasIntersection(const SDL_Rect * A,
|
||||
const SDL_Rect * B);
|
||||
|
||||
/**
|
||||
* \brief Calculate the intersection of two rectangles.
|
||||
*
|
||||
* \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRect(const SDL_Rect * A,
|
||||
const SDL_Rect * B,
|
||||
SDL_Rect * result);
|
||||
|
||||
/**
|
||||
* \brief Calculate the union of two rectangles.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_UnionRect(const SDL_Rect * A,
|
||||
const SDL_Rect * B,
|
||||
SDL_Rect * result);
|
||||
|
||||
/**
|
||||
* \brief Calculate a minimal rectangle enclosing a set of points
|
||||
*
|
||||
* \return SDL_TRUE if any points were within the clipping rect
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_EnclosePoints(const SDL_Point * points,
|
||||
int count,
|
||||
const SDL_Rect * clip,
|
||||
SDL_Rect * result);
|
||||
|
||||
/**
|
||||
* \brief Calculate the intersection of a rectangle and line segment.
|
||||
*
|
||||
* \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect *
|
||||
rect, int *X1,
|
||||
int *Y1, int *X2,
|
||||
int *Y2);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_rect_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,870 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_render.h
|
||||
*
|
||||
* Header file for SDL 2D rendering functions.
|
||||
*
|
||||
* This API supports the following features:
|
||||
* * single pixel points
|
||||
* * single pixel lines
|
||||
* * filled rectangles
|
||||
* * texture images
|
||||
*
|
||||
* The primitives may be drawn in opaque, blended, or additive modes.
|
||||
*
|
||||
* The texture images may be drawn in opaque, blended, or additive modes.
|
||||
* They can have an additional color tint or alpha modulation applied to
|
||||
* them, and may also be stretched with linear interpolation.
|
||||
*
|
||||
* This API is designed to accelerate simple 2D operations. You may
|
||||
* want more functionality such as polygons and particle effects and
|
||||
* in that case you should use SDL's OpenGL/Direct3D support or one
|
||||
* of the many good 3D engines.
|
||||
*
|
||||
* These functions must be called from the main thread.
|
||||
* See this bug for details: http://bugzilla.libsdl.org/show_bug.cgi?id=1995
|
||||
*/
|
||||
|
||||
#ifndef _SDL_render_h
|
||||
#define _SDL_render_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_rect.h"
|
||||
#include "SDL_video.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Flags used when creating a rendering context
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_RENDERER_SOFTWARE = 0x00000001, /**< The renderer is a software fallback */
|
||||
SDL_RENDERER_ACCELERATED = 0x00000002, /**< The renderer uses hardware
|
||||
acceleration */
|
||||
SDL_RENDERER_PRESENTVSYNC = 0x00000004, /**< Present is synchronized
|
||||
with the refresh rate */
|
||||
SDL_RENDERER_TARGETTEXTURE = 0x00000008 /**< The renderer supports
|
||||
rendering to texture */
|
||||
} SDL_RendererFlags;
|
||||
|
||||
/**
|
||||
* \brief Information on the capabilities of a render driver or context.
|
||||
*/
|
||||
typedef struct SDL_RendererInfo
|
||||
{
|
||||
const char *name; /**< The name of the renderer */
|
||||
Uint32 flags; /**< Supported ::SDL_RendererFlags */
|
||||
Uint32 num_texture_formats; /**< The number of available texture formats */
|
||||
Uint32 texture_formats[16]; /**< The available texture formats */
|
||||
int max_texture_width; /**< The maximimum texture width */
|
||||
int max_texture_height; /**< The maximimum texture height */
|
||||
} SDL_RendererInfo;
|
||||
|
||||
/**
|
||||
* \brief The access pattern allowed for a texture.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_TEXTUREACCESS_STATIC, /**< Changes rarely, not lockable */
|
||||
SDL_TEXTUREACCESS_STREAMING, /**< Changes frequently, lockable */
|
||||
SDL_TEXTUREACCESS_TARGET /**< Texture can be used as a render target */
|
||||
} SDL_TextureAccess;
|
||||
|
||||
/**
|
||||
* \brief The texture channel modulation used in SDL_RenderCopy().
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_TEXTUREMODULATE_NONE = 0x00000000, /**< No modulation */
|
||||
SDL_TEXTUREMODULATE_COLOR = 0x00000001, /**< srcC = srcC * color */
|
||||
SDL_TEXTUREMODULATE_ALPHA = 0x00000002 /**< srcA = srcA * alpha */
|
||||
} SDL_TextureModulate;
|
||||
|
||||
/**
|
||||
* \brief Flip constants for SDL_RenderCopyEx
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_FLIP_NONE = 0x00000000, /**< Do not flip */
|
||||
SDL_FLIP_HORIZONTAL = 0x00000001, /**< flip horizontally */
|
||||
SDL_FLIP_VERTICAL = 0x00000002 /**< flip vertically */
|
||||
} SDL_RendererFlip;
|
||||
|
||||
/**
|
||||
* \brief A structure representing rendering state
|
||||
*/
|
||||
struct SDL_Renderer;
|
||||
typedef struct SDL_Renderer SDL_Renderer;
|
||||
|
||||
/**
|
||||
* \brief An efficient driver-specific representation of pixel data
|
||||
*/
|
||||
struct SDL_Texture;
|
||||
typedef struct SDL_Texture SDL_Texture;
|
||||
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/**
|
||||
* \brief Get the number of 2D rendering drivers available for the current
|
||||
* display.
|
||||
*
|
||||
* A render driver is a set of code that handles rendering and texture
|
||||
* management on a particular display. Normally there is only one, but
|
||||
* some drivers may have several available with different capabilities.
|
||||
*
|
||||
* \sa SDL_GetRenderDriverInfo()
|
||||
* \sa SDL_CreateRenderer()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetNumRenderDrivers(void);
|
||||
|
||||
/**
|
||||
* \brief Get information about a specific 2D rendering driver for the current
|
||||
* display.
|
||||
*
|
||||
* \param index The index of the driver to query information about.
|
||||
* \param info A pointer to an SDL_RendererInfo struct to be filled with
|
||||
* information on the rendering driver.
|
||||
*
|
||||
* \return 0 on success, -1 if the index was out of range.
|
||||
*
|
||||
* \sa SDL_CreateRenderer()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetRenderDriverInfo(int index,
|
||||
SDL_RendererInfo * info);
|
||||
|
||||
/**
|
||||
* \brief Create a window and default renderer
|
||||
*
|
||||
* \param width The width of the window
|
||||
* \param height The height of the window
|
||||
* \param window_flags The flags used to create the window
|
||||
* \param window A pointer filled with the window, or NULL on error
|
||||
* \param renderer A pointer filled with the renderer, or NULL on error
|
||||
*
|
||||
* \return 0 on success, or -1 on error
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_CreateWindowAndRenderer(
|
||||
int width, int height, Uint32 window_flags,
|
||||
SDL_Window **window, SDL_Renderer **renderer);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Create a 2D rendering context for a window.
|
||||
*
|
||||
* \param window The window where rendering is displayed.
|
||||
* \param index The index of the rendering driver to initialize, or -1 to
|
||||
* initialize the first one supporting the requested flags.
|
||||
* \param flags ::SDL_RendererFlags.
|
||||
*
|
||||
* \return A valid rendering context or NULL if there was an error.
|
||||
*
|
||||
* \sa SDL_CreateSoftwareRenderer()
|
||||
* \sa SDL_GetRendererInfo()
|
||||
* \sa SDL_DestroyRenderer()
|
||||
*/
|
||||
extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateRenderer(SDL_Window * window,
|
||||
int index, Uint32 flags);
|
||||
|
||||
/**
|
||||
* \brief Create a 2D software rendering context for a surface.
|
||||
*
|
||||
* \param surface The surface where rendering is done.
|
||||
*
|
||||
* \return A valid rendering context or NULL if there was an error.
|
||||
*
|
||||
* \sa SDL_CreateRenderer()
|
||||
* \sa SDL_DestroyRenderer()
|
||||
*/
|
||||
extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateSoftwareRenderer(SDL_Surface * surface);
|
||||
|
||||
/**
|
||||
* \brief Get the renderer associated with a window.
|
||||
*/
|
||||
extern DECLSPEC SDL_Renderer * SDLCALL SDL_GetRenderer(SDL_Window * window);
|
||||
|
||||
/**
|
||||
* \brief Get information about a rendering context.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetRendererInfo(SDL_Renderer * renderer,
|
||||
SDL_RendererInfo * info);
|
||||
|
||||
/**
|
||||
* \brief Get the output size of a rendering context.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetRendererOutputSize(SDL_Renderer * renderer,
|
||||
int *w, int *h);
|
||||
|
||||
/**
|
||||
* \brief Create a texture for a rendering context.
|
||||
*
|
||||
* \param renderer The renderer.
|
||||
* \param format The format of the texture.
|
||||
* \param access One of the enumerated values in ::SDL_TextureAccess.
|
||||
* \param w The width of the texture in pixels.
|
||||
* \param h The height of the texture in pixels.
|
||||
*
|
||||
* \return The created texture is returned, or 0 if no rendering context was
|
||||
* active, the format was unsupported, or the width or height were out
|
||||
* of range.
|
||||
*
|
||||
* \sa SDL_QueryTexture()
|
||||
* \sa SDL_UpdateTexture()
|
||||
* \sa SDL_DestroyTexture()
|
||||
*/
|
||||
extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTexture(SDL_Renderer * renderer,
|
||||
Uint32 format,
|
||||
int access, int w,
|
||||
int h);
|
||||
|
||||
/**
|
||||
* \brief Create a texture from an existing surface.
|
||||
*
|
||||
* \param renderer The renderer.
|
||||
* \param surface The surface containing pixel data used to fill the texture.
|
||||
*
|
||||
* \return The created texture is returned, or 0 on error.
|
||||
*
|
||||
* \note The surface is not modified or freed by this function.
|
||||
*
|
||||
* \sa SDL_QueryTexture()
|
||||
* \sa SDL_DestroyTexture()
|
||||
*/
|
||||
extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(SDL_Renderer * renderer, SDL_Surface * surface);
|
||||
|
||||
/**
|
||||
* \brief Query the attributes of a texture
|
||||
*
|
||||
* \param texture A texture to be queried.
|
||||
* \param format A pointer filled in with the raw format of the texture. The
|
||||
* actual format may differ, but pixel transfers will use this
|
||||
* format.
|
||||
* \param access A pointer filled in with the actual access to the texture.
|
||||
* \param w A pointer filled in with the width of the texture in pixels.
|
||||
* \param h A pointer filled in with the height of the texture in pixels.
|
||||
*
|
||||
* \return 0 on success, or -1 if the texture is not valid.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_QueryTexture(SDL_Texture * texture,
|
||||
Uint32 * format, int *access,
|
||||
int *w, int *h);
|
||||
|
||||
/**
|
||||
* \brief Set an additional color value used in render copy operations.
|
||||
*
|
||||
* \param texture The texture to update.
|
||||
* \param r The red color value multiplied into copy operations.
|
||||
* \param g The green color value multiplied into copy operations.
|
||||
* \param b The blue color value multiplied into copy operations.
|
||||
*
|
||||
* \return 0 on success, or -1 if the texture is not valid or color modulation
|
||||
* is not supported.
|
||||
*
|
||||
* \sa SDL_GetTextureColorMod()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetTextureColorMod(SDL_Texture * texture,
|
||||
Uint8 r, Uint8 g, Uint8 b);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Get the additional color value used in render copy operations.
|
||||
*
|
||||
* \param texture The texture to query.
|
||||
* \param r A pointer filled in with the current red color value.
|
||||
* \param g A pointer filled in with the current green color value.
|
||||
* \param b A pointer filled in with the current blue color value.
|
||||
*
|
||||
* \return 0 on success, or -1 if the texture is not valid.
|
||||
*
|
||||
* \sa SDL_SetTextureColorMod()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetTextureColorMod(SDL_Texture * texture,
|
||||
Uint8 * r, Uint8 * g,
|
||||
Uint8 * b);
|
||||
|
||||
/**
|
||||
* \brief Set an additional alpha value used in render copy operations.
|
||||
*
|
||||
* \param texture The texture to update.
|
||||
* \param alpha The alpha value multiplied into copy operations.
|
||||
*
|
||||
* \return 0 on success, or -1 if the texture is not valid or alpha modulation
|
||||
* is not supported.
|
||||
*
|
||||
* \sa SDL_GetTextureAlphaMod()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetTextureAlphaMod(SDL_Texture * texture,
|
||||
Uint8 alpha);
|
||||
|
||||
/**
|
||||
* \brief Get the additional alpha value used in render copy operations.
|
||||
*
|
||||
* \param texture The texture to query.
|
||||
* \param alpha A pointer filled in with the current alpha value.
|
||||
*
|
||||
* \return 0 on success, or -1 if the texture is not valid.
|
||||
*
|
||||
* \sa SDL_SetTextureAlphaMod()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetTextureAlphaMod(SDL_Texture * texture,
|
||||
Uint8 * alpha);
|
||||
|
||||
/**
|
||||
* \brief Set the blend mode used for texture copy operations.
|
||||
*
|
||||
* \param texture The texture to update.
|
||||
* \param blendMode ::SDL_BlendMode to use for texture blending.
|
||||
*
|
||||
* \return 0 on success, or -1 if the texture is not valid or the blend mode is
|
||||
* not supported.
|
||||
*
|
||||
* \note If the blend mode is not supported, the closest supported mode is
|
||||
* chosen.
|
||||
*
|
||||
* \sa SDL_GetTextureBlendMode()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture,
|
||||
SDL_BlendMode blendMode);
|
||||
|
||||
/**
|
||||
* \brief Get the blend mode used for texture copy operations.
|
||||
*
|
||||
* \param texture The texture to query.
|
||||
* \param blendMode A pointer filled in with the current blend mode.
|
||||
*
|
||||
* \return 0 on success, or -1 if the texture is not valid.
|
||||
*
|
||||
* \sa SDL_SetTextureBlendMode()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture,
|
||||
SDL_BlendMode *blendMode);
|
||||
|
||||
/**
|
||||
* \brief Update the given texture rectangle with new pixel data.
|
||||
*
|
||||
* \param texture The texture to update
|
||||
* \param rect A pointer to the rectangle of pixels to update, or NULL to
|
||||
* update the entire texture.
|
||||
* \param pixels The raw pixel data.
|
||||
* \param pitch The number of bytes between rows of pixel data.
|
||||
*
|
||||
* \return 0 on success, or -1 if the texture is not valid.
|
||||
*
|
||||
* \note This is a fairly slow function.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_UpdateTexture(SDL_Texture * texture,
|
||||
const SDL_Rect * rect,
|
||||
const void *pixels, int pitch);
|
||||
|
||||
/**
|
||||
* \brief Update a rectangle within a planar YV12 or IYUV texture with new pixel data.
|
||||
*
|
||||
* \param texture The texture to update
|
||||
* \param rect A pointer to the rectangle of pixels to update, or NULL to
|
||||
* update the entire texture.
|
||||
* \param Yplane The raw pixel data for the Y plane.
|
||||
* \param Ypitch The number of bytes between rows of pixel data for the Y plane.
|
||||
* \param Uplane The raw pixel data for the U plane.
|
||||
* \param Upitch The number of bytes between rows of pixel data for the U plane.
|
||||
* \param Vplane The raw pixel data for the V plane.
|
||||
* \param Vpitch The number of bytes between rows of pixel data for the V plane.
|
||||
*
|
||||
* \return 0 on success, or -1 if the texture is not valid.
|
||||
*
|
||||
* \note You can use SDL_UpdateTexture() as long as your pixel data is
|
||||
* a contiguous block of Y and U/V planes in the proper order, but
|
||||
* this function is available if your pixel data is not contiguous.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_UpdateYUVTexture(SDL_Texture * texture,
|
||||
const SDL_Rect * rect,
|
||||
const Uint8 *Yplane, int Ypitch,
|
||||
const Uint8 *Uplane, int Upitch,
|
||||
const Uint8 *Vplane, int Vpitch);
|
||||
|
||||
/**
|
||||
* \brief Lock a portion of the texture for write-only pixel access.
|
||||
*
|
||||
* \param texture The texture to lock for access, which was created with
|
||||
* ::SDL_TEXTUREACCESS_STREAMING.
|
||||
* \param rect A pointer to the rectangle to lock for access. If the rect
|
||||
* is NULL, the entire texture will be locked.
|
||||
* \param pixels This is filled in with a pointer to the locked pixels,
|
||||
* appropriately offset by the locked area.
|
||||
* \param pitch This is filled in with the pitch of the locked pixels.
|
||||
*
|
||||
* \return 0 on success, or -1 if the texture is not valid or was not created with ::SDL_TEXTUREACCESS_STREAMING.
|
||||
*
|
||||
* \sa SDL_UnlockTexture()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_LockTexture(SDL_Texture * texture,
|
||||
const SDL_Rect * rect,
|
||||
void **pixels, int *pitch);
|
||||
|
||||
/**
|
||||
* \brief Unlock a texture, uploading the changes to video memory, if needed.
|
||||
*
|
||||
* \sa SDL_LockTexture()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture);
|
||||
|
||||
/**
|
||||
* \brief Determines whether a window supports the use of render targets
|
||||
*
|
||||
* \param renderer The renderer that will be checked
|
||||
*
|
||||
* \return SDL_TRUE if supported, SDL_FALSE if not.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_RenderTargetSupported(SDL_Renderer *renderer);
|
||||
|
||||
/**
|
||||
* \brief Set a texture as the current rendering target.
|
||||
*
|
||||
* \param renderer The renderer.
|
||||
* \param texture The targeted texture, which must be created with the SDL_TEXTUREACCESS_TARGET flag, or NULL for the default render target
|
||||
*
|
||||
* \return 0 on success, or -1 on error
|
||||
*
|
||||
* \sa SDL_GetRenderTarget()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetRenderTarget(SDL_Renderer *renderer,
|
||||
SDL_Texture *texture);
|
||||
|
||||
/**
|
||||
* \brief Get the current render target or NULL for the default render target.
|
||||
*
|
||||
* \return The current render target
|
||||
*
|
||||
* \sa SDL_SetRenderTarget()
|
||||
*/
|
||||
extern DECLSPEC SDL_Texture * SDLCALL SDL_GetRenderTarget(SDL_Renderer *renderer);
|
||||
|
||||
/**
|
||||
* \brief Set device independent resolution for rendering
|
||||
*
|
||||
* \param renderer The renderer for which resolution should be set.
|
||||
* \param w The width of the logical resolution
|
||||
* \param h The height of the logical resolution
|
||||
*
|
||||
* This function uses the viewport and scaling functionality to allow a fixed logical
|
||||
* resolution for rendering, regardless of the actual output resolution. If the actual
|
||||
* output resolution doesn't have the same aspect ratio the output rendering will be
|
||||
* centered within the output display.
|
||||
*
|
||||
* If the output display is a window, mouse events in the window will be filtered
|
||||
* and scaled so they seem to arrive within the logical resolution.
|
||||
*
|
||||
* \note If this function results in scaling or subpixel drawing by the
|
||||
* rendering backend, it will be handled using the appropriate
|
||||
* quality hints.
|
||||
*
|
||||
* \sa SDL_RenderGetLogicalSize()
|
||||
* \sa SDL_RenderSetScale()
|
||||
* \sa SDL_RenderSetViewport()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RenderSetLogicalSize(SDL_Renderer * renderer, int w, int h);
|
||||
|
||||
/**
|
||||
* \brief Get device independent resolution for rendering
|
||||
*
|
||||
* \param renderer The renderer from which resolution should be queried.
|
||||
* \param w A pointer filled with the width of the logical resolution
|
||||
* \param h A pointer filled with the height of the logical resolution
|
||||
*
|
||||
* \sa SDL_RenderSetLogicalSize()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *h);
|
||||
|
||||
/**
|
||||
* \brief Set the drawing area for rendering on the current target.
|
||||
*
|
||||
* \param renderer The renderer for which the drawing area should be set.
|
||||
* \param rect The rectangle representing the drawing area, or NULL to set the viewport to the entire target.
|
||||
*
|
||||
* The x,y of the viewport rect represents the origin for rendering.
|
||||
*
|
||||
* \return 0 on success, or -1 on error
|
||||
*
|
||||
* \note If the window associated with the renderer is resized, the viewport is automatically reset.
|
||||
*
|
||||
* \sa SDL_RenderGetViewport()
|
||||
* \sa SDL_RenderSetLogicalSize()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RenderSetViewport(SDL_Renderer * renderer,
|
||||
const SDL_Rect * rect);
|
||||
|
||||
/**
|
||||
* \brief Get the drawing area for the current target.
|
||||
*
|
||||
* \sa SDL_RenderSetViewport()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_RenderGetViewport(SDL_Renderer * renderer,
|
||||
SDL_Rect * rect);
|
||||
|
||||
/**
|
||||
* \brief Set the clip rectangle for the current target.
|
||||
*
|
||||
* \param renderer The renderer for which clip rectangle should be set.
|
||||
* \param rect A pointer to the rectangle to set as the clip rectangle, or
|
||||
* NULL to disable clipping.
|
||||
*
|
||||
* \return 0 on success, or -1 on error
|
||||
*
|
||||
* \sa SDL_RenderGetClipRect()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RenderSetClipRect(SDL_Renderer * renderer,
|
||||
const SDL_Rect * rect);
|
||||
|
||||
/**
|
||||
* \brief Get the clip rectangle for the current target.
|
||||
*
|
||||
* \param renderer The renderer from which clip rectangle should be queried.
|
||||
* \param rect A pointer filled in with the current clip rectangle, or
|
||||
* an empty rectangle if clipping is disabled.
|
||||
*
|
||||
* \sa SDL_RenderSetClipRect()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_RenderGetClipRect(SDL_Renderer * renderer,
|
||||
SDL_Rect * rect);
|
||||
|
||||
/**
|
||||
* \brief Set the drawing scale for rendering on the current target.
|
||||
*
|
||||
* \param renderer The renderer for which the drawing scale should be set.
|
||||
* \param scaleX The horizontal scaling factor
|
||||
* \param scaleY The vertical scaling factor
|
||||
*
|
||||
* The drawing coordinates are scaled by the x/y scaling factors
|
||||
* before they are used by the renderer. This allows resolution
|
||||
* independent drawing with a single coordinate system.
|
||||
*
|
||||
* \note If this results in scaling or subpixel drawing by the
|
||||
* rendering backend, it will be handled using the appropriate
|
||||
* quality hints. For best results use integer scaling factors.
|
||||
*
|
||||
* \sa SDL_RenderGetScale()
|
||||
* \sa SDL_RenderSetLogicalSize()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RenderSetScale(SDL_Renderer * renderer,
|
||||
float scaleX, float scaleY);
|
||||
|
||||
/**
|
||||
* \brief Get the drawing scale for the current target.
|
||||
*
|
||||
* \param renderer The renderer from which drawing scale should be queried.
|
||||
* \param scaleX A pointer filled in with the horizontal scaling factor
|
||||
* \param scaleY A pointer filled in with the vertical scaling factor
|
||||
*
|
||||
* \sa SDL_RenderSetScale()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_RenderGetScale(SDL_Renderer * renderer,
|
||||
float *scaleX, float *scaleY);
|
||||
|
||||
/**
|
||||
* \brief Set the color used for drawing operations (Rect, Line and Clear).
|
||||
*
|
||||
* \param renderer The renderer for which drawing color should be set.
|
||||
* \param r The red value used to draw on the rendering target.
|
||||
* \param g The green value used to draw on the rendering target.
|
||||
* \param b The blue value used to draw on the rendering target.
|
||||
* \param a The alpha value used to draw on the rendering target, usually
|
||||
* ::SDL_ALPHA_OPAQUE (255).
|
||||
*
|
||||
* \return 0 on success, or -1 on error
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetRenderDrawColor(SDL_Renderer * renderer,
|
||||
Uint8 r, Uint8 g, Uint8 b,
|
||||
Uint8 a);
|
||||
|
||||
/**
|
||||
* \brief Get the color used for drawing operations (Rect, Line and Clear).
|
||||
*
|
||||
* \param renderer The renderer from which drawing color should be queried.
|
||||
* \param r A pointer to the red value used to draw on the rendering target.
|
||||
* \param g A pointer to the green value used to draw on the rendering target.
|
||||
* \param b A pointer to the blue value used to draw on the rendering target.
|
||||
* \param a A pointer to the alpha value used to draw on the rendering target,
|
||||
* usually ::SDL_ALPHA_OPAQUE (255).
|
||||
*
|
||||
* \return 0 on success, or -1 on error
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetRenderDrawColor(SDL_Renderer * renderer,
|
||||
Uint8 * r, Uint8 * g, Uint8 * b,
|
||||
Uint8 * a);
|
||||
|
||||
/**
|
||||
* \brief Set the blend mode used for drawing operations (Fill and Line).
|
||||
*
|
||||
* \param renderer The renderer for which blend mode should be set.
|
||||
* \param blendMode ::SDL_BlendMode to use for blending.
|
||||
*
|
||||
* \return 0 on success, or -1 on error
|
||||
*
|
||||
* \note If the blend mode is not supported, the closest supported mode is
|
||||
* chosen.
|
||||
*
|
||||
* \sa SDL_GetRenderDrawBlendMode()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetRenderDrawBlendMode(SDL_Renderer * renderer,
|
||||
SDL_BlendMode blendMode);
|
||||
|
||||
/**
|
||||
* \brief Get the blend mode used for drawing operations.
|
||||
*
|
||||
* \param renderer The renderer from which blend mode should be queried.
|
||||
* \param blendMode A pointer filled in with the current blend mode.
|
||||
*
|
||||
* \return 0 on success, or -1 on error
|
||||
*
|
||||
* \sa SDL_SetRenderDrawBlendMode()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(SDL_Renderer * renderer,
|
||||
SDL_BlendMode *blendMode);
|
||||
|
||||
/**
|
||||
* \brief Clear the current rendering target with the drawing color
|
||||
*
|
||||
* This function clears the entire rendering target, ignoring the viewport.
|
||||
*
|
||||
* \return 0 on success, or -1 on error
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RenderClear(SDL_Renderer * renderer);
|
||||
|
||||
/**
|
||||
* \brief Draw a point on the current rendering target.
|
||||
*
|
||||
* \param renderer The renderer which should draw a point.
|
||||
* \param x The x coordinate of the point.
|
||||
* \param y The y coordinate of the point.
|
||||
*
|
||||
* \return 0 on success, or -1 on error
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RenderDrawPoint(SDL_Renderer * renderer,
|
||||
int x, int y);
|
||||
|
||||
/**
|
||||
* \brief Draw multiple points on the current rendering target.
|
||||
*
|
||||
* \param renderer The renderer which should draw multiple points.
|
||||
* \param points The points to draw
|
||||
* \param count The number of points to draw
|
||||
*
|
||||
* \return 0 on success, or -1 on error
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RenderDrawPoints(SDL_Renderer * renderer,
|
||||
const SDL_Point * points,
|
||||
int count);
|
||||
|
||||
/**
|
||||
* \brief Draw a line on the current rendering target.
|
||||
*
|
||||
* \param renderer The renderer which should draw a line.
|
||||
* \param x1 The x coordinate of the start point.
|
||||
* \param y1 The y coordinate of the start point.
|
||||
* \param x2 The x coordinate of the end point.
|
||||
* \param y2 The y coordinate of the end point.
|
||||
*
|
||||
* \return 0 on success, or -1 on error
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RenderDrawLine(SDL_Renderer * renderer,
|
||||
int x1, int y1, int x2, int y2);
|
||||
|
||||
/**
|
||||
* \brief Draw a series of connected lines on the current rendering target.
|
||||
*
|
||||
* \param renderer The renderer which should draw multiple lines.
|
||||
* \param points The points along the lines
|
||||
* \param count The number of points, drawing count-1 lines
|
||||
*
|
||||
* \return 0 on success, or -1 on error
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RenderDrawLines(SDL_Renderer * renderer,
|
||||
const SDL_Point * points,
|
||||
int count);
|
||||
|
||||
/**
|
||||
* \brief Draw a rectangle on the current rendering target.
|
||||
*
|
||||
* \param renderer The renderer which should draw a rectangle.
|
||||
* \param rect A pointer to the destination rectangle, or NULL to outline the entire rendering target.
|
||||
*
|
||||
* \return 0 on success, or -1 on error
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RenderDrawRect(SDL_Renderer * renderer,
|
||||
const SDL_Rect * rect);
|
||||
|
||||
/**
|
||||
* \brief Draw some number of rectangles on the current rendering target.
|
||||
*
|
||||
* \param renderer The renderer which should draw multiple rectangles.
|
||||
* \param rects A pointer to an array of destination rectangles.
|
||||
* \param count The number of rectangles.
|
||||
*
|
||||
* \return 0 on success, or -1 on error
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RenderDrawRects(SDL_Renderer * renderer,
|
||||
const SDL_Rect * rects,
|
||||
int count);
|
||||
|
||||
/**
|
||||
* \brief Fill a rectangle on the current rendering target with the drawing color.
|
||||
*
|
||||
* \param renderer The renderer which should fill a rectangle.
|
||||
* \param rect A pointer to the destination rectangle, or NULL for the entire
|
||||
* rendering target.
|
||||
*
|
||||
* \return 0 on success, or -1 on error
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RenderFillRect(SDL_Renderer * renderer,
|
||||
const SDL_Rect * rect);
|
||||
|
||||
/**
|
||||
* \brief Fill some number of rectangles on the current rendering target with the drawing color.
|
||||
*
|
||||
* \param renderer The renderer which should fill multiple rectangles.
|
||||
* \param rects A pointer to an array of destination rectangles.
|
||||
* \param count The number of rectangles.
|
||||
*
|
||||
* \return 0 on success, or -1 on error
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RenderFillRects(SDL_Renderer * renderer,
|
||||
const SDL_Rect * rects,
|
||||
int count);
|
||||
|
||||
/**
|
||||
* \brief Copy a portion of the texture to the current rendering target.
|
||||
*
|
||||
* \param renderer The renderer which should copy parts of a texture.
|
||||
* \param texture The source texture.
|
||||
* \param srcrect A pointer to the source rectangle, or NULL for the entire
|
||||
* texture.
|
||||
* \param dstrect A pointer to the destination rectangle, or NULL for the
|
||||
* entire rendering target.
|
||||
*
|
||||
* \return 0 on success, or -1 on error
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer,
|
||||
SDL_Texture * texture,
|
||||
const SDL_Rect * srcrect,
|
||||
const SDL_Rect * dstrect);
|
||||
|
||||
/**
|
||||
* \brief Copy a portion of the source texture to the current rendering target, rotating it by angle around the given center
|
||||
*
|
||||
* \param renderer The renderer which should copy parts of a texture.
|
||||
* \param texture The source texture.
|
||||
* \param srcrect A pointer to the source rectangle, or NULL for the entire
|
||||
* texture.
|
||||
* \param dstrect A pointer to the destination rectangle, or NULL for the
|
||||
* entire rendering target.
|
||||
* \param angle An angle in degrees that indicates the rotation that will be applied to dstrect
|
||||
* \param center A pointer to a point indicating the point around which dstrect will be rotated (if NULL, rotation will be done aroud dstrect.w/2, dstrect.h/2)
|
||||
* \param flip An SDL_RendererFlip value stating which flipping actions should be performed on the texture
|
||||
*
|
||||
* \return 0 on success, or -1 on error
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RenderCopyEx(SDL_Renderer * renderer,
|
||||
SDL_Texture * texture,
|
||||
const SDL_Rect * srcrect,
|
||||
const SDL_Rect * dstrect,
|
||||
const double angle,
|
||||
const SDL_Point *center,
|
||||
const SDL_RendererFlip flip);
|
||||
|
||||
/**
|
||||
* \brief Read pixels from the current rendering target.
|
||||
*
|
||||
* \param renderer The renderer from which pixels should be read.
|
||||
* \param rect A pointer to the rectangle to read, or NULL for the entire
|
||||
* render target.
|
||||
* \param format The desired format of the pixel data, or 0 to use the format
|
||||
* of the rendering target
|
||||
* \param pixels A pointer to be filled in with the pixel data
|
||||
* \param pitch The pitch of the pixels parameter.
|
||||
*
|
||||
* \return 0 on success, or -1 if pixel reading is not supported.
|
||||
*
|
||||
* \warning This is a very slow operation, and should not be used frequently.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RenderReadPixels(SDL_Renderer * renderer,
|
||||
const SDL_Rect * rect,
|
||||
Uint32 format,
|
||||
void *pixels, int pitch);
|
||||
|
||||
/**
|
||||
* \brief Update the screen with rendering performed.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_RenderPresent(SDL_Renderer * renderer);
|
||||
|
||||
/**
|
||||
* \brief Destroy the specified texture.
|
||||
*
|
||||
* \sa SDL_CreateTexture()
|
||||
* \sa SDL_CreateTextureFromSurface()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_Texture * texture);
|
||||
|
||||
/**
|
||||
* \brief Destroy the rendering context for a window and free associated
|
||||
* textures.
|
||||
*
|
||||
* \sa SDL_CreateRenderer()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer * renderer);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Bind the texture to the current OpenGL/ES/ES2 context for use with
|
||||
* OpenGL instructions.
|
||||
*
|
||||
* \param texture The SDL texture to bind
|
||||
* \param texw A pointer to a float that will be filled with the texture width
|
||||
* \param texh A pointer to a float that will be filled with the texture height
|
||||
*
|
||||
* \return 0 on success, or -1 if the operation is not supported
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GL_BindTexture(SDL_Texture *texture, float *texw, float *texh);
|
||||
|
||||
/**
|
||||
* \brief Unbind a texture from the current OpenGL/ES/ES2 context.
|
||||
*
|
||||
* \param texture The SDL texture to unbind
|
||||
*
|
||||
* \return 0 on success, or -1 if the operation is not supported
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GL_UnbindTexture(SDL_Texture *texture);
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_render_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,2 @@
|
|||
#define SDL_REVISION "hg-8628:b558f99d48f0"
|
||||
#define SDL_REVISION_NUMBER 8628
|
|
@ -0,0 +1,232 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_rwops.h
|
||||
*
|
||||
* This file provides a general interface for SDL to read and write
|
||||
* data streams. It can easily be extended to files, memory, etc.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_rwops_h
|
||||
#define _SDL_rwops_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* RWops Types */
|
||||
#define SDL_RWOPS_UNKNOWN 0 /* Unknown stream type */
|
||||
#define SDL_RWOPS_WINFILE 1 /* Win32 file */
|
||||
#define SDL_RWOPS_STDFILE 2 /* Stdio file */
|
||||
#define SDL_RWOPS_JNIFILE 3 /* Android asset */
|
||||
#define SDL_RWOPS_MEMORY 4 /* Memory stream */
|
||||
#define SDL_RWOPS_MEMORY_RO 5 /* Read-Only memory stream */
|
||||
|
||||
/**
|
||||
* This is the read/write operation structure -- very basic.
|
||||
*/
|
||||
typedef struct SDL_RWops
|
||||
{
|
||||
/**
|
||||
* Return the size of the file in this rwops, or -1 if unknown
|
||||
*/
|
||||
Sint64 (SDLCALL * size) (struct SDL_RWops * context);
|
||||
|
||||
/**
|
||||
* Seek to \c offset relative to \c whence, one of stdio's whence values:
|
||||
* RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END
|
||||
*
|
||||
* \return the final offset in the data stream, or -1 on error.
|
||||
*/
|
||||
Sint64 (SDLCALL * seek) (struct SDL_RWops * context, Sint64 offset,
|
||||
int whence);
|
||||
|
||||
/**
|
||||
* Read up to \c maxnum objects each of size \c size from the data
|
||||
* stream to the area pointed at by \c ptr.
|
||||
*
|
||||
* \return the number of objects read, or 0 at error or end of file.
|
||||
*/
|
||||
size_t (SDLCALL * read) (struct SDL_RWops * context, void *ptr,
|
||||
size_t size, size_t maxnum);
|
||||
|
||||
/**
|
||||
* Write exactly \c num objects each of size \c size from the area
|
||||
* pointed at by \c ptr to data stream.
|
||||
*
|
||||
* \return the number of objects written, or 0 at error or end of file.
|
||||
*/
|
||||
size_t (SDLCALL * write) (struct SDL_RWops * context, const void *ptr,
|
||||
size_t size, size_t num);
|
||||
|
||||
/**
|
||||
* Close and free an allocated SDL_RWops structure.
|
||||
*
|
||||
* \return 0 if successful or -1 on write error when flushing data.
|
||||
*/
|
||||
int (SDLCALL * close) (struct SDL_RWops * context);
|
||||
|
||||
Uint32 type;
|
||||
union
|
||||
{
|
||||
#if defined(ANDROID)
|
||||
struct
|
||||
{
|
||||
void *fileNameRef;
|
||||
void *inputStreamRef;
|
||||
void *readableByteChannelRef;
|
||||
void *readMethod;
|
||||
void *assetFileDescriptorRef;
|
||||
long position;
|
||||
long size;
|
||||
long offset;
|
||||
int fd;
|
||||
} androidio;
|
||||
#elif defined(__WIN32__)
|
||||
struct
|
||||
{
|
||||
SDL_bool append;
|
||||
void *h;
|
||||
struct
|
||||
{
|
||||
void *data;
|
||||
size_t size;
|
||||
size_t left;
|
||||
} buffer;
|
||||
} windowsio;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDIO_H
|
||||
struct
|
||||
{
|
||||
SDL_bool autoclose;
|
||||
FILE *fp;
|
||||
} stdio;
|
||||
#endif
|
||||
struct
|
||||
{
|
||||
Uint8 *base;
|
||||
Uint8 *here;
|
||||
Uint8 *stop;
|
||||
} mem;
|
||||
struct
|
||||
{
|
||||
void *data1;
|
||||
void *data2;
|
||||
} unknown;
|
||||
} hidden;
|
||||
|
||||
} SDL_RWops;
|
||||
|
||||
|
||||
/**
|
||||
* \name RWFrom functions
|
||||
*
|
||||
* Functions to create SDL_RWops structures from various data streams.
|
||||
*/
|
||||
/* @{ */
|
||||
|
||||
extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile(const char *file,
|
||||
const char *mode);
|
||||
|
||||
#ifdef HAVE_STDIO_H
|
||||
extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(FILE * fp,
|
||||
SDL_bool autoclose);
|
||||
#else
|
||||
extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(void * fp,
|
||||
SDL_bool autoclose);
|
||||
#endif
|
||||
|
||||
extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem(void *mem, int size);
|
||||
extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromConstMem(const void *mem,
|
||||
int size);
|
||||
|
||||
/* @} *//* RWFrom functions */
|
||||
|
||||
|
||||
extern DECLSPEC SDL_RWops *SDLCALL SDL_AllocRW(void);
|
||||
extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops * area);
|
||||
|
||||
#define RW_SEEK_SET 0 /**< Seek from the beginning of data */
|
||||
#define RW_SEEK_CUR 1 /**< Seek relative to current read point */
|
||||
#define RW_SEEK_END 2 /**< Seek relative to the end of data */
|
||||
|
||||
/**
|
||||
* \name Read/write macros
|
||||
*
|
||||
* Macros to easily read and write from an SDL_RWops structure.
|
||||
*/
|
||||
/* @{ */
|
||||
#define SDL_RWsize(ctx) (ctx)->size(ctx)
|
||||
#define SDL_RWseek(ctx, offset, whence) (ctx)->seek(ctx, offset, whence)
|
||||
#define SDL_RWtell(ctx) (ctx)->seek(ctx, 0, RW_SEEK_CUR)
|
||||
#define SDL_RWread(ctx, ptr, size, n) (ctx)->read(ctx, ptr, size, n)
|
||||
#define SDL_RWwrite(ctx, ptr, size, n) (ctx)->write(ctx, ptr, size, n)
|
||||
#define SDL_RWclose(ctx) (ctx)->close(ctx)
|
||||
/* @} *//* Read/write macros */
|
||||
|
||||
|
||||
/**
|
||||
* \name Read endian functions
|
||||
*
|
||||
* Read an item of the specified endianness and return in native format.
|
||||
*/
|
||||
/* @{ */
|
||||
extern DECLSPEC Uint8 SDLCALL SDL_ReadU8(SDL_RWops * src);
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_ReadLE16(SDL_RWops * src);
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_ReadBE16(SDL_RWops * src);
|
||||
extern DECLSPEC Uint32 SDLCALL SDL_ReadLE32(SDL_RWops * src);
|
||||
extern DECLSPEC Uint32 SDLCALL SDL_ReadBE32(SDL_RWops * src);
|
||||
extern DECLSPEC Uint64 SDLCALL SDL_ReadLE64(SDL_RWops * src);
|
||||
extern DECLSPEC Uint64 SDLCALL SDL_ReadBE64(SDL_RWops * src);
|
||||
/* @} *//* Read endian functions */
|
||||
|
||||
/**
|
||||
* \name Write endian functions
|
||||
*
|
||||
* Write an item of native format to the specified endianness.
|
||||
*/
|
||||
/* @{ */
|
||||
extern DECLSPEC size_t SDLCALL SDL_WriteU8(SDL_RWops * dst, Uint8 value);
|
||||
extern DECLSPEC size_t SDLCALL SDL_WriteLE16(SDL_RWops * dst, Uint16 value);
|
||||
extern DECLSPEC size_t SDLCALL SDL_WriteBE16(SDL_RWops * dst, Uint16 value);
|
||||
extern DECLSPEC size_t SDLCALL SDL_WriteLE32(SDL_RWops * dst, Uint32 value);
|
||||
extern DECLSPEC size_t SDLCALL SDL_WriteBE32(SDL_RWops * dst, Uint32 value);
|
||||
extern DECLSPEC size_t SDLCALL SDL_WriteLE64(SDL_RWops * dst, Uint64 value);
|
||||
extern DECLSPEC size_t SDLCALL SDL_WriteBE64(SDL_RWops * dst, Uint64 value);
|
||||
/* @} *//* Write endian functions */
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_rwops_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,401 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_scancode.h
|
||||
*
|
||||
* Defines keyboard scancodes.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_scancode_h
|
||||
#define _SDL_scancode_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
/**
|
||||
* \brief The SDL keyboard scancode representation.
|
||||
*
|
||||
* Values of this type are used to represent keyboard keys, among other places
|
||||
* in the \link SDL_Keysym::scancode key.keysym.scancode \endlink field of the
|
||||
* SDL_Event structure.
|
||||
*
|
||||
* The values in this enumeration are based on the USB usage page standard:
|
||||
* http://www.usb.org/developers/devclass_docs/Hut1_12v2.pdf
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_SCANCODE_UNKNOWN = 0,
|
||||
|
||||
/**
|
||||
* \name Usage page 0x07
|
||||
*
|
||||
* These values are from usage page 0x07 (USB keyboard page).
|
||||
*/
|
||||
/* @{ */
|
||||
|
||||
SDL_SCANCODE_A = 4,
|
||||
SDL_SCANCODE_B = 5,
|
||||
SDL_SCANCODE_C = 6,
|
||||
SDL_SCANCODE_D = 7,
|
||||
SDL_SCANCODE_E = 8,
|
||||
SDL_SCANCODE_F = 9,
|
||||
SDL_SCANCODE_G = 10,
|
||||
SDL_SCANCODE_H = 11,
|
||||
SDL_SCANCODE_I = 12,
|
||||
SDL_SCANCODE_J = 13,
|
||||
SDL_SCANCODE_K = 14,
|
||||
SDL_SCANCODE_L = 15,
|
||||
SDL_SCANCODE_M = 16,
|
||||
SDL_SCANCODE_N = 17,
|
||||
SDL_SCANCODE_O = 18,
|
||||
SDL_SCANCODE_P = 19,
|
||||
SDL_SCANCODE_Q = 20,
|
||||
SDL_SCANCODE_R = 21,
|
||||
SDL_SCANCODE_S = 22,
|
||||
SDL_SCANCODE_T = 23,
|
||||
SDL_SCANCODE_U = 24,
|
||||
SDL_SCANCODE_V = 25,
|
||||
SDL_SCANCODE_W = 26,
|
||||
SDL_SCANCODE_X = 27,
|
||||
SDL_SCANCODE_Y = 28,
|
||||
SDL_SCANCODE_Z = 29,
|
||||
|
||||
SDL_SCANCODE_1 = 30,
|
||||
SDL_SCANCODE_2 = 31,
|
||||
SDL_SCANCODE_3 = 32,
|
||||
SDL_SCANCODE_4 = 33,
|
||||
SDL_SCANCODE_5 = 34,
|
||||
SDL_SCANCODE_6 = 35,
|
||||
SDL_SCANCODE_7 = 36,
|
||||
SDL_SCANCODE_8 = 37,
|
||||
SDL_SCANCODE_9 = 38,
|
||||
SDL_SCANCODE_0 = 39,
|
||||
|
||||
SDL_SCANCODE_RETURN = 40,
|
||||
SDL_SCANCODE_ESCAPE = 41,
|
||||
SDL_SCANCODE_BACKSPACE = 42,
|
||||
SDL_SCANCODE_TAB = 43,
|
||||
SDL_SCANCODE_SPACE = 44,
|
||||
|
||||
SDL_SCANCODE_MINUS = 45,
|
||||
SDL_SCANCODE_EQUALS = 46,
|
||||
SDL_SCANCODE_LEFTBRACKET = 47,
|
||||
SDL_SCANCODE_RIGHTBRACKET = 48,
|
||||
SDL_SCANCODE_BACKSLASH = 49, /**< Located at the lower left of the return
|
||||
* key on ISO keyboards and at the right end
|
||||
* of the QWERTY row on ANSI keyboards.
|
||||
* Produces REVERSE SOLIDUS (backslash) and
|
||||
* VERTICAL LINE in a US layout, REVERSE
|
||||
* SOLIDUS and VERTICAL LINE in a UK Mac
|
||||
* layout, NUMBER SIGN and TILDE in a UK
|
||||
* Windows layout, DOLLAR SIGN and POUND SIGN
|
||||
* in a Swiss German layout, NUMBER SIGN and
|
||||
* APOSTROPHE in a German layout, GRAVE
|
||||
* ACCENT and POUND SIGN in a French Mac
|
||||
* layout, and ASTERISK and MICRO SIGN in a
|
||||
* French Windows layout.
|
||||
*/
|
||||
SDL_SCANCODE_NONUSHASH = 50, /**< ISO USB keyboards actually use this code
|
||||
* instead of 49 for the same key, but all
|
||||
* OSes I've seen treat the two codes
|
||||
* identically. So, as an implementor, unless
|
||||
* your keyboard generates both of those
|
||||
* codes and your OS treats them differently,
|
||||
* you should generate SDL_SCANCODE_BACKSLASH
|
||||
* instead of this code. As a user, you
|
||||
* should not rely on this code because SDL
|
||||
* will never generate it with most (all?)
|
||||
* keyboards.
|
||||
*/
|
||||
SDL_SCANCODE_SEMICOLON = 51,
|
||||
SDL_SCANCODE_APOSTROPHE = 52,
|
||||
SDL_SCANCODE_GRAVE = 53, /**< Located in the top left corner (on both ANSI
|
||||
* and ISO keyboards). Produces GRAVE ACCENT and
|
||||
* TILDE in a US Windows layout and in US and UK
|
||||
* Mac layouts on ANSI keyboards, GRAVE ACCENT
|
||||
* and NOT SIGN in a UK Windows layout, SECTION
|
||||
* SIGN and PLUS-MINUS SIGN in US and UK Mac
|
||||
* layouts on ISO keyboards, SECTION SIGN and
|
||||
* DEGREE SIGN in a Swiss German layout (Mac:
|
||||
* only on ISO keyboards), CIRCUMFLEX ACCENT and
|
||||
* DEGREE SIGN in a German layout (Mac: only on
|
||||
* ISO keyboards), SUPERSCRIPT TWO and TILDE in a
|
||||
* French Windows layout, COMMERCIAL AT and
|
||||
* NUMBER SIGN in a French Mac layout on ISO
|
||||
* keyboards, and LESS-THAN SIGN and GREATER-THAN
|
||||
* SIGN in a Swiss German, German, or French Mac
|
||||
* layout on ANSI keyboards.
|
||||
*/
|
||||
SDL_SCANCODE_COMMA = 54,
|
||||
SDL_SCANCODE_PERIOD = 55,
|
||||
SDL_SCANCODE_SLASH = 56,
|
||||
|
||||
SDL_SCANCODE_CAPSLOCK = 57,
|
||||
|
||||
SDL_SCANCODE_F1 = 58,
|
||||
SDL_SCANCODE_F2 = 59,
|
||||
SDL_SCANCODE_F3 = 60,
|
||||
SDL_SCANCODE_F4 = 61,
|
||||
SDL_SCANCODE_F5 = 62,
|
||||
SDL_SCANCODE_F6 = 63,
|
||||
SDL_SCANCODE_F7 = 64,
|
||||
SDL_SCANCODE_F8 = 65,
|
||||
SDL_SCANCODE_F9 = 66,
|
||||
SDL_SCANCODE_F10 = 67,
|
||||
SDL_SCANCODE_F11 = 68,
|
||||
SDL_SCANCODE_F12 = 69,
|
||||
|
||||
SDL_SCANCODE_PRINTSCREEN = 70,
|
||||
SDL_SCANCODE_SCROLLLOCK = 71,
|
||||
SDL_SCANCODE_PAUSE = 72,
|
||||
SDL_SCANCODE_INSERT = 73, /**< insert on PC, help on some Mac keyboards (but
|
||||
does send code 73, not 117) */
|
||||
SDL_SCANCODE_HOME = 74,
|
||||
SDL_SCANCODE_PAGEUP = 75,
|
||||
SDL_SCANCODE_DELETE = 76,
|
||||
SDL_SCANCODE_END = 77,
|
||||
SDL_SCANCODE_PAGEDOWN = 78,
|
||||
SDL_SCANCODE_RIGHT = 79,
|
||||
SDL_SCANCODE_LEFT = 80,
|
||||
SDL_SCANCODE_DOWN = 81,
|
||||
SDL_SCANCODE_UP = 82,
|
||||
|
||||
SDL_SCANCODE_NUMLOCKCLEAR = 83, /**< num lock on PC, clear on Mac keyboards
|
||||
*/
|
||||
SDL_SCANCODE_KP_DIVIDE = 84,
|
||||
SDL_SCANCODE_KP_MULTIPLY = 85,
|
||||
SDL_SCANCODE_KP_MINUS = 86,
|
||||
SDL_SCANCODE_KP_PLUS = 87,
|
||||
SDL_SCANCODE_KP_ENTER = 88,
|
||||
SDL_SCANCODE_KP_1 = 89,
|
||||
SDL_SCANCODE_KP_2 = 90,
|
||||
SDL_SCANCODE_KP_3 = 91,
|
||||
SDL_SCANCODE_KP_4 = 92,
|
||||
SDL_SCANCODE_KP_5 = 93,
|
||||
SDL_SCANCODE_KP_6 = 94,
|
||||
SDL_SCANCODE_KP_7 = 95,
|
||||
SDL_SCANCODE_KP_8 = 96,
|
||||
SDL_SCANCODE_KP_9 = 97,
|
||||
SDL_SCANCODE_KP_0 = 98,
|
||||
SDL_SCANCODE_KP_PERIOD = 99,
|
||||
|
||||
SDL_SCANCODE_NONUSBACKSLASH = 100, /**< This is the additional key that ISO
|
||||
* keyboards have over ANSI ones,
|
||||
* located between left shift and Y.
|
||||
* Produces GRAVE ACCENT and TILDE in a
|
||||
* US or UK Mac layout, REVERSE SOLIDUS
|
||||
* (backslash) and VERTICAL LINE in a
|
||||
* US or UK Windows layout, and
|
||||
* LESS-THAN SIGN and GREATER-THAN SIGN
|
||||
* in a Swiss German, German, or French
|
||||
* layout. */
|
||||
SDL_SCANCODE_APPLICATION = 101, /**< windows contextual menu, compose */
|
||||
SDL_SCANCODE_POWER = 102, /**< The USB document says this is a status flag,
|
||||
* not a physical key - but some Mac keyboards
|
||||
* do have a power key. */
|
||||
SDL_SCANCODE_KP_EQUALS = 103,
|
||||
SDL_SCANCODE_F13 = 104,
|
||||
SDL_SCANCODE_F14 = 105,
|
||||
SDL_SCANCODE_F15 = 106,
|
||||
SDL_SCANCODE_F16 = 107,
|
||||
SDL_SCANCODE_F17 = 108,
|
||||
SDL_SCANCODE_F18 = 109,
|
||||
SDL_SCANCODE_F19 = 110,
|
||||
SDL_SCANCODE_F20 = 111,
|
||||
SDL_SCANCODE_F21 = 112,
|
||||
SDL_SCANCODE_F22 = 113,
|
||||
SDL_SCANCODE_F23 = 114,
|
||||
SDL_SCANCODE_F24 = 115,
|
||||
SDL_SCANCODE_EXECUTE = 116,
|
||||
SDL_SCANCODE_HELP = 117,
|
||||
SDL_SCANCODE_MENU = 118,
|
||||
SDL_SCANCODE_SELECT = 119,
|
||||
SDL_SCANCODE_STOP = 120,
|
||||
SDL_SCANCODE_AGAIN = 121, /**< redo */
|
||||
SDL_SCANCODE_UNDO = 122,
|
||||
SDL_SCANCODE_CUT = 123,
|
||||
SDL_SCANCODE_COPY = 124,
|
||||
SDL_SCANCODE_PASTE = 125,
|
||||
SDL_SCANCODE_FIND = 126,
|
||||
SDL_SCANCODE_MUTE = 127,
|
||||
SDL_SCANCODE_VOLUMEUP = 128,
|
||||
SDL_SCANCODE_VOLUMEDOWN = 129,
|
||||
/* not sure whether there's a reason to enable these */
|
||||
/* SDL_SCANCODE_LOCKINGCAPSLOCK = 130, */
|
||||
/* SDL_SCANCODE_LOCKINGNUMLOCK = 131, */
|
||||
/* SDL_SCANCODE_LOCKINGSCROLLLOCK = 132, */
|
||||
SDL_SCANCODE_KP_COMMA = 133,
|
||||
SDL_SCANCODE_KP_EQUALSAS400 = 134,
|
||||
|
||||
SDL_SCANCODE_INTERNATIONAL1 = 135, /**< used on Asian keyboards, see
|
||||
footnotes in USB doc */
|
||||
SDL_SCANCODE_INTERNATIONAL2 = 136,
|
||||
SDL_SCANCODE_INTERNATIONAL3 = 137, /**< Yen */
|
||||
SDL_SCANCODE_INTERNATIONAL4 = 138,
|
||||
SDL_SCANCODE_INTERNATIONAL5 = 139,
|
||||
SDL_SCANCODE_INTERNATIONAL6 = 140,
|
||||
SDL_SCANCODE_INTERNATIONAL7 = 141,
|
||||
SDL_SCANCODE_INTERNATIONAL8 = 142,
|
||||
SDL_SCANCODE_INTERNATIONAL9 = 143,
|
||||
SDL_SCANCODE_LANG1 = 144, /**< Hangul/English toggle */
|
||||
SDL_SCANCODE_LANG2 = 145, /**< Hanja conversion */
|
||||
SDL_SCANCODE_LANG3 = 146, /**< Katakana */
|
||||
SDL_SCANCODE_LANG4 = 147, /**< Hiragana */
|
||||
SDL_SCANCODE_LANG5 = 148, /**< Zenkaku/Hankaku */
|
||||
SDL_SCANCODE_LANG6 = 149, /**< reserved */
|
||||
SDL_SCANCODE_LANG7 = 150, /**< reserved */
|
||||
SDL_SCANCODE_LANG8 = 151, /**< reserved */
|
||||
SDL_SCANCODE_LANG9 = 152, /**< reserved */
|
||||
|
||||
SDL_SCANCODE_ALTERASE = 153, /**< Erase-Eaze */
|
||||
SDL_SCANCODE_SYSREQ = 154,
|
||||
SDL_SCANCODE_CANCEL = 155,
|
||||
SDL_SCANCODE_CLEAR = 156,
|
||||
SDL_SCANCODE_PRIOR = 157,
|
||||
SDL_SCANCODE_RETURN2 = 158,
|
||||
SDL_SCANCODE_SEPARATOR = 159,
|
||||
SDL_SCANCODE_OUT = 160,
|
||||
SDL_SCANCODE_OPER = 161,
|
||||
SDL_SCANCODE_CLEARAGAIN = 162,
|
||||
SDL_SCANCODE_CRSEL = 163,
|
||||
SDL_SCANCODE_EXSEL = 164,
|
||||
|
||||
SDL_SCANCODE_KP_00 = 176,
|
||||
SDL_SCANCODE_KP_000 = 177,
|
||||
SDL_SCANCODE_THOUSANDSSEPARATOR = 178,
|
||||
SDL_SCANCODE_DECIMALSEPARATOR = 179,
|
||||
SDL_SCANCODE_CURRENCYUNIT = 180,
|
||||
SDL_SCANCODE_CURRENCYSUBUNIT = 181,
|
||||
SDL_SCANCODE_KP_LEFTPAREN = 182,
|
||||
SDL_SCANCODE_KP_RIGHTPAREN = 183,
|
||||
SDL_SCANCODE_KP_LEFTBRACE = 184,
|
||||
SDL_SCANCODE_KP_RIGHTBRACE = 185,
|
||||
SDL_SCANCODE_KP_TAB = 186,
|
||||
SDL_SCANCODE_KP_BACKSPACE = 187,
|
||||
SDL_SCANCODE_KP_A = 188,
|
||||
SDL_SCANCODE_KP_B = 189,
|
||||
SDL_SCANCODE_KP_C = 190,
|
||||
SDL_SCANCODE_KP_D = 191,
|
||||
SDL_SCANCODE_KP_E = 192,
|
||||
SDL_SCANCODE_KP_F = 193,
|
||||
SDL_SCANCODE_KP_XOR = 194,
|
||||
SDL_SCANCODE_KP_POWER = 195,
|
||||
SDL_SCANCODE_KP_PERCENT = 196,
|
||||
SDL_SCANCODE_KP_LESS = 197,
|
||||
SDL_SCANCODE_KP_GREATER = 198,
|
||||
SDL_SCANCODE_KP_AMPERSAND = 199,
|
||||
SDL_SCANCODE_KP_DBLAMPERSAND = 200,
|
||||
SDL_SCANCODE_KP_VERTICALBAR = 201,
|
||||
SDL_SCANCODE_KP_DBLVERTICALBAR = 202,
|
||||
SDL_SCANCODE_KP_COLON = 203,
|
||||
SDL_SCANCODE_KP_HASH = 204,
|
||||
SDL_SCANCODE_KP_SPACE = 205,
|
||||
SDL_SCANCODE_KP_AT = 206,
|
||||
SDL_SCANCODE_KP_EXCLAM = 207,
|
||||
SDL_SCANCODE_KP_MEMSTORE = 208,
|
||||
SDL_SCANCODE_KP_MEMRECALL = 209,
|
||||
SDL_SCANCODE_KP_MEMCLEAR = 210,
|
||||
SDL_SCANCODE_KP_MEMADD = 211,
|
||||
SDL_SCANCODE_KP_MEMSUBTRACT = 212,
|
||||
SDL_SCANCODE_KP_MEMMULTIPLY = 213,
|
||||
SDL_SCANCODE_KP_MEMDIVIDE = 214,
|
||||
SDL_SCANCODE_KP_PLUSMINUS = 215,
|
||||
SDL_SCANCODE_KP_CLEAR = 216,
|
||||
SDL_SCANCODE_KP_CLEARENTRY = 217,
|
||||
SDL_SCANCODE_KP_BINARY = 218,
|
||||
SDL_SCANCODE_KP_OCTAL = 219,
|
||||
SDL_SCANCODE_KP_DECIMAL = 220,
|
||||
SDL_SCANCODE_KP_HEXADECIMAL = 221,
|
||||
|
||||
SDL_SCANCODE_LCTRL = 224,
|
||||
SDL_SCANCODE_LSHIFT = 225,
|
||||
SDL_SCANCODE_LALT = 226, /**< alt, option */
|
||||
SDL_SCANCODE_LGUI = 227, /**< windows, command (apple), meta */
|
||||
SDL_SCANCODE_RCTRL = 228,
|
||||
SDL_SCANCODE_RSHIFT = 229,
|
||||
SDL_SCANCODE_RALT = 230, /**< alt gr, option */
|
||||
SDL_SCANCODE_RGUI = 231, /**< windows, command (apple), meta */
|
||||
|
||||
SDL_SCANCODE_MODE = 257, /**< I'm not sure if this is really not covered
|
||||
* by any of the above, but since there's a
|
||||
* special KMOD_MODE for it I'm adding it here
|
||||
*/
|
||||
|
||||
/* @} *//* Usage page 0x07 */
|
||||
|
||||
/**
|
||||
* \name Usage page 0x0C
|
||||
*
|
||||
* These values are mapped from usage page 0x0C (USB consumer page).
|
||||
*/
|
||||
/* @{ */
|
||||
|
||||
SDL_SCANCODE_AUDIONEXT = 258,
|
||||
SDL_SCANCODE_AUDIOPREV = 259,
|
||||
SDL_SCANCODE_AUDIOSTOP = 260,
|
||||
SDL_SCANCODE_AUDIOPLAY = 261,
|
||||
SDL_SCANCODE_AUDIOMUTE = 262,
|
||||
SDL_SCANCODE_MEDIASELECT = 263,
|
||||
SDL_SCANCODE_WWW = 264,
|
||||
SDL_SCANCODE_MAIL = 265,
|
||||
SDL_SCANCODE_CALCULATOR = 266,
|
||||
SDL_SCANCODE_COMPUTER = 267,
|
||||
SDL_SCANCODE_AC_SEARCH = 268,
|
||||
SDL_SCANCODE_AC_HOME = 269,
|
||||
SDL_SCANCODE_AC_BACK = 270,
|
||||
SDL_SCANCODE_AC_FORWARD = 271,
|
||||
SDL_SCANCODE_AC_STOP = 272,
|
||||
SDL_SCANCODE_AC_REFRESH = 273,
|
||||
SDL_SCANCODE_AC_BOOKMARKS = 274,
|
||||
|
||||
/* @} *//* Usage page 0x0C */
|
||||
|
||||
/**
|
||||
* \name Walther keys
|
||||
*
|
||||
* These are values that Christian Walther added (for mac keyboard?).
|
||||
*/
|
||||
/* @{ */
|
||||
|
||||
SDL_SCANCODE_BRIGHTNESSDOWN = 275,
|
||||
SDL_SCANCODE_BRIGHTNESSUP = 276,
|
||||
SDL_SCANCODE_DISPLAYSWITCH = 277, /**< display mirroring/dual display
|
||||
switch, video mode switch */
|
||||
SDL_SCANCODE_KBDILLUMTOGGLE = 278,
|
||||
SDL_SCANCODE_KBDILLUMDOWN = 279,
|
||||
SDL_SCANCODE_KBDILLUMUP = 280,
|
||||
SDL_SCANCODE_EJECT = 281,
|
||||
SDL_SCANCODE_SLEEP = 282,
|
||||
|
||||
SDL_SCANCODE_APP1 = 283,
|
||||
SDL_SCANCODE_APP2 = 284,
|
||||
|
||||
/* @} *//* Walther keys */
|
||||
|
||||
/* Add any other keys here. */
|
||||
|
||||
SDL_NUM_SCANCODES = 512 /**< not a key, just marks the number of scancodes
|
||||
for array bounds */
|
||||
} SDL_Scancode;
|
||||
|
||||
#endif /* _SDL_scancode_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,143 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_shape_h
|
||||
#define _SDL_shape_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_pixels.h"
|
||||
#include "SDL_rect.h"
|
||||
#include "SDL_surface.h"
|
||||
#include "SDL_video.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \file SDL_shape.h
|
||||
*
|
||||
* Header file for the shaped window API.
|
||||
*/
|
||||
|
||||
#define SDL_NONSHAPEABLE_WINDOW -1
|
||||
#define SDL_INVALID_SHAPE_ARGUMENT -2
|
||||
#define SDL_WINDOW_LACKS_SHAPE -3
|
||||
|
||||
/**
|
||||
* \brief Create a window that can be shaped with the specified position, dimensions, and flags.
|
||||
*
|
||||
* \param title The title of the window, in UTF-8 encoding.
|
||||
* \param x The x position of the window, ::SDL_WINDOWPOS_CENTERED, or
|
||||
* ::SDL_WINDOWPOS_UNDEFINED.
|
||||
* \param y The y position of the window, ::SDL_WINDOWPOS_CENTERED, or
|
||||
* ::SDL_WINDOWPOS_UNDEFINED.
|
||||
* \param w The width of the window.
|
||||
* \param h The height of the window.
|
||||
* \param flags The flags for the window, a mask of SDL_WINDOW_BORDERLESS with any of the following:
|
||||
* ::SDL_WINDOW_OPENGL, ::SDL_WINDOW_INPUT_GRABBED,
|
||||
* ::SDL_WINDOW_HIDDEN, ::SDL_WINDOW_RESIZABLE,
|
||||
* ::SDL_WINDOW_MAXIMIZED, ::SDL_WINDOW_MINIMIZED,
|
||||
* ::SDL_WINDOW_BORDERLESS is always set, and ::SDL_WINDOW_FULLSCREEN is always unset.
|
||||
*
|
||||
* \return The window created, or NULL if window creation failed.
|
||||
*
|
||||
* \sa SDL_DestroyWindow()
|
||||
*/
|
||||
extern DECLSPEC SDL_Window * SDLCALL SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags);
|
||||
|
||||
/**
|
||||
* \brief Return whether the given window is a shaped window.
|
||||
*
|
||||
* \param window The window to query for being shaped.
|
||||
*
|
||||
* \return SDL_TRUE if the window is a window that can be shaped, SDL_FALSE if the window is unshaped or NULL.
|
||||
* \sa SDL_CreateShapedWindow
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IsShapedWindow(const SDL_Window *window);
|
||||
|
||||
/** \brief An enum denoting the specific type of contents present in an SDL_WindowShapeParams union. */
|
||||
typedef enum {
|
||||
/** \brief The default mode, a binarized alpha cutoff of 1. */
|
||||
ShapeModeDefault,
|
||||
/** \brief A binarized alpha cutoff with a given integer value. */
|
||||
ShapeModeBinarizeAlpha,
|
||||
/** \brief A binarized alpha cutoff with a given integer value, but with the opposite comparison. */
|
||||
ShapeModeReverseBinarizeAlpha,
|
||||
/** \brief A color key is applied. */
|
||||
ShapeModeColorKey
|
||||
} WindowShapeMode;
|
||||
|
||||
#define SDL_SHAPEMODEALPHA(mode) (mode == ShapeModeDefault || mode == ShapeModeBinarizeAlpha || mode == ShapeModeReverseBinarizeAlpha)
|
||||
|
||||
/** \brief A union containing parameters for shaped windows. */
|
||||
typedef union {
|
||||
/** \brief a cutoff alpha value for binarization of the window shape's alpha channel. */
|
||||
Uint8 binarizationCutoff;
|
||||
SDL_Color colorKey;
|
||||
} SDL_WindowShapeParams;
|
||||
|
||||
/** \brief A struct that tags the SDL_WindowShapeParams union with an enum describing the type of its contents. */
|
||||
typedef struct SDL_WindowShapeMode {
|
||||
/** \brief The mode of these window-shape parameters. */
|
||||
WindowShapeMode mode;
|
||||
/** \brief Window-shape parameters. */
|
||||
SDL_WindowShapeParams parameters;
|
||||
} SDL_WindowShapeMode;
|
||||
|
||||
/**
|
||||
* \brief Set the shape and parameters of a shaped window.
|
||||
*
|
||||
* \param window The shaped window whose parameters should be set.
|
||||
* \param shape A surface encoding the desired shape for the window.
|
||||
* \param shape_mode The parameters to set for the shaped window.
|
||||
*
|
||||
* \return 0 on success, SDL_INVALID_SHAPE_ARGUMENT on invalid an invalid shape argument, or SDL_NONSHAPEABLE_WINDOW
|
||||
* if the SDL_Window* given does not reference a valid shaped window.
|
||||
*
|
||||
* \sa SDL_WindowShapeMode
|
||||
* \sa SDL_GetShapedWindowMode.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode);
|
||||
|
||||
/**
|
||||
* \brief Get the shape parameters of a shaped window.
|
||||
*
|
||||
* \param window The shaped window whose parameters should be retrieved.
|
||||
* \param shape_mode An empty shape-mode structure to fill, or NULL to check whether the window has a shape.
|
||||
*
|
||||
* \return 0 if the window has a shape and, provided shape_mode was not NULL, shape_mode has been filled with the mode
|
||||
* data, SDL_NONSHAPEABLE_WINDOW if the SDL_Window given is not a shaped window, or SDL_WINDOW_LACKS_SHAPE if
|
||||
* the SDL_Window* given is a shapeable window currently lacking a shape.
|
||||
*
|
||||
* \sa SDL_WindowShapeMode
|
||||
* \sa SDL_SetWindowShape
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetShapedWindowMode(SDL_Window *window,SDL_WindowShapeMode *shape_mode);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_shape_h */
|
|
@ -0,0 +1,405 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_stdinc.h
|
||||
*
|
||||
* This is a general header that includes C language support.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_stdinc_h
|
||||
#define _SDL_stdinc_h
|
||||
|
||||
#include "SDL_config.h"
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#if defined(STDC_HEADERS)
|
||||
# include <stdlib.h>
|
||||
# include <stddef.h>
|
||||
# include <stdarg.h>
|
||||
#else
|
||||
# if defined(HAVE_STDLIB_H)
|
||||
# include <stdlib.h>
|
||||
# elif defined(HAVE_MALLOC_H)
|
||||
# include <malloc.h>
|
||||
# endif
|
||||
# if defined(HAVE_STDDEF_H)
|
||||
# include <stddef.h>
|
||||
# endif
|
||||
# if defined(HAVE_STDARG_H)
|
||||
# include <stdarg.h>
|
||||
# endif
|
||||
#endif
|
||||
#ifdef HAVE_STRING_H
|
||||
# if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H)
|
||||
# include <memory.h>
|
||||
# endif
|
||||
# include <string.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
#endif
|
||||
#if defined(HAVE_INTTYPES_H)
|
||||
# include <inttypes.h>
|
||||
#elif defined(HAVE_STDINT_H)
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
#ifdef HAVE_CTYPE_H
|
||||
# include <ctype.h>
|
||||
#endif
|
||||
#ifdef HAVE_MATH_H
|
||||
# if defined(__WINRT__)
|
||||
/* Defining _USE_MATH_DEFINES is required to get M_PI to be defined on
|
||||
WinRT. See http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx
|
||||
for more information.
|
||||
*/
|
||||
# define _USE_MATH_DEFINES
|
||||
# endif
|
||||
# include <math.h>
|
||||
#endif
|
||||
#ifdef HAVE_FLOAT_H
|
||||
# include <float.h>
|
||||
#endif
|
||||
#if defined(HAVE_ICONV) && defined(HAVE_ICONV_H)
|
||||
# include <iconv.h>
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The number of elements in an array.
|
||||
*/
|
||||
#define SDL_arraysize(array) (sizeof(array)/sizeof(array[0]))
|
||||
#define SDL_TABLESIZE(table) SDL_arraysize(table)
|
||||
|
||||
/**
|
||||
* \name Cast operators
|
||||
*
|
||||
* Use proper C++ casts when compiled as C++ to be compatible with the option
|
||||
* -Wold-style-cast of GCC (and -Werror=old-style-cast in GCC 4.2 and above).
|
||||
*/
|
||||
/* @{ */
|
||||
#ifdef __cplusplus
|
||||
#define SDL_reinterpret_cast(type, expression) reinterpret_cast<type>(expression)
|
||||
#define SDL_static_cast(type, expression) static_cast<type>(expression)
|
||||
#define SDL_const_cast(type, expression) const_cast<type>(expression)
|
||||
#else
|
||||
#define SDL_reinterpret_cast(type, expression) ((type)(expression))
|
||||
#define SDL_static_cast(type, expression) ((type)(expression))
|
||||
#define SDL_const_cast(type, expression) ((type)(expression))
|
||||
#endif
|
||||
/* @} *//* Cast operators */
|
||||
|
||||
/* Define a four character code as a Uint32 */
|
||||
#define SDL_FOURCC(A, B, C, D) \
|
||||
((SDL_static_cast(Uint32, SDL_static_cast(Uint8, (A))) << 0) | \
|
||||
(SDL_static_cast(Uint32, SDL_static_cast(Uint8, (B))) << 8) | \
|
||||
(SDL_static_cast(Uint32, SDL_static_cast(Uint8, (C))) << 16) | \
|
||||
(SDL_static_cast(Uint32, SDL_static_cast(Uint8, (D))) << 24))
|
||||
|
||||
/**
|
||||
* \name Basic data types
|
||||
*/
|
||||
/* @{ */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SDL_FALSE = 0,
|
||||
SDL_TRUE = 1
|
||||
} SDL_bool;
|
||||
|
||||
/**
|
||||
* \brief A signed 8-bit integer type.
|
||||
*/
|
||||
typedef int8_t Sint8;
|
||||
/**
|
||||
* \brief An unsigned 8-bit integer type.
|
||||
*/
|
||||
typedef uint8_t Uint8;
|
||||
/**
|
||||
* \brief A signed 16-bit integer type.
|
||||
*/
|
||||
typedef int16_t Sint16;
|
||||
/**
|
||||
* \brief An unsigned 16-bit integer type.
|
||||
*/
|
||||
typedef uint16_t Uint16;
|
||||
/**
|
||||
* \brief A signed 32-bit integer type.
|
||||
*/
|
||||
typedef int32_t Sint32;
|
||||
/**
|
||||
* \brief An unsigned 32-bit integer type.
|
||||
*/
|
||||
typedef uint32_t Uint32;
|
||||
|
||||
/**
|
||||
* \brief A signed 64-bit integer type.
|
||||
*/
|
||||
typedef int64_t Sint64;
|
||||
/**
|
||||
* \brief An unsigned 64-bit integer type.
|
||||
*/
|
||||
typedef uint64_t Uint64;
|
||||
|
||||
/* @} *//* Basic data types */
|
||||
|
||||
|
||||
#define SDL_COMPILE_TIME_ASSERT(name, x) \
|
||||
typedef int SDL_dummy_ ## name[(x) * 2 - 1]
|
||||
/** \cond */
|
||||
#ifndef DOXYGEN_SHOULD_IGNORE_THIS
|
||||
SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1);
|
||||
SDL_COMPILE_TIME_ASSERT(sint8, sizeof(Sint8) == 1);
|
||||
SDL_COMPILE_TIME_ASSERT(uint16, sizeof(Uint16) == 2);
|
||||
SDL_COMPILE_TIME_ASSERT(sint16, sizeof(Sint16) == 2);
|
||||
SDL_COMPILE_TIME_ASSERT(uint32, sizeof(Uint32) == 4);
|
||||
SDL_COMPILE_TIME_ASSERT(sint32, sizeof(Sint32) == 4);
|
||||
SDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8);
|
||||
SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
|
||||
#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
|
||||
/** \endcond */
|
||||
|
||||
/* Check to make sure enums are the size of ints, for structure packing.
|
||||
For both Watcom C/C++ and Borland C/C++ the compiler option that makes
|
||||
enums having the size of an int must be enabled.
|
||||
This is "-b" for Borland C/C++ and "-ei" for Watcom C/C++ (v11).
|
||||
*/
|
||||
|
||||
/** \cond */
|
||||
#ifndef DOXYGEN_SHOULD_IGNORE_THIS
|
||||
#if !defined(__ANDROID__)
|
||||
/* TODO: include/SDL_stdinc.h:174: error: size of array 'SDL_dummy_enum' is negative */
|
||||
typedef enum
|
||||
{
|
||||
DUMMY_ENUM_VALUE
|
||||
} SDL_DUMMY_ENUM;
|
||||
|
||||
SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
|
||||
#endif
|
||||
#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
|
||||
/** \endcond */
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_ALLOCA) && !defined(alloca)
|
||||
# if defined(HAVE_ALLOCA_H)
|
||||
# include <alloca.h>
|
||||
# elif defined(__GNUC__)
|
||||
# define alloca __builtin_alloca
|
||||
# elif defined(_MSC_VER)
|
||||
# include <malloc.h>
|
||||
# define alloca _alloca
|
||||
# elif defined(__WATCOMC__)
|
||||
# include <malloc.h>
|
||||
# elif defined(__BORLANDC__)
|
||||
# include <malloc.h>
|
||||
# elif defined(__DMC__)
|
||||
# include <stdlib.h>
|
||||
# elif defined(__AIX__)
|
||||
#pragma alloca
|
||||
# elif defined(__MRC__)
|
||||
void *alloca(unsigned);
|
||||
# else
|
||||
char *alloca();
|
||||
# endif
|
||||
#endif
|
||||
#ifdef HAVE_ALLOCA
|
||||
#define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*(count))
|
||||
#define SDL_stack_free(data)
|
||||
#else
|
||||
#define SDL_stack_alloc(type, count) (type*)SDL_malloc(sizeof(type)*(count))
|
||||
#define SDL_stack_free(data) SDL_free(data)
|
||||
#endif
|
||||
|
||||
extern DECLSPEC void *SDLCALL SDL_malloc(size_t size);
|
||||
extern DECLSPEC void *SDLCALL SDL_calloc(size_t nmemb, size_t size);
|
||||
extern DECLSPEC void *SDLCALL SDL_realloc(void *mem, size_t size);
|
||||
extern DECLSPEC void SDLCALL SDL_free(void *mem);
|
||||
|
||||
extern DECLSPEC char *SDLCALL SDL_getenv(const char *name);
|
||||
extern DECLSPEC int SDLCALL SDL_setenv(const char *name, const char *value, int overwrite);
|
||||
|
||||
extern DECLSPEC void SDLCALL SDL_qsort(void *base, size_t nmemb, size_t size, int (*compare) (const void *, const void *));
|
||||
|
||||
extern DECLSPEC int SDLCALL SDL_abs(int x);
|
||||
|
||||
/* !!! FIXME: these have side effects. You probably shouldn't use them. */
|
||||
/* !!! FIXME: Maybe we do forceinline functions of SDL_mini, SDL_minf, etc? */
|
||||
#define SDL_min(x, y) (((x) < (y)) ? (x) : (y))
|
||||
#define SDL_max(x, y) (((x) > (y)) ? (x) : (y))
|
||||
|
||||
extern DECLSPEC int SDLCALL SDL_isdigit(int x);
|
||||
extern DECLSPEC int SDLCALL SDL_isspace(int x);
|
||||
extern DECLSPEC int SDLCALL SDL_toupper(int x);
|
||||
extern DECLSPEC int SDLCALL SDL_tolower(int x);
|
||||
|
||||
extern DECLSPEC void *SDLCALL SDL_memset(void *dst, int c, size_t len);
|
||||
|
||||
#define SDL_zero(x) SDL_memset(&(x), 0, sizeof((x)))
|
||||
#define SDL_zerop(x) SDL_memset((x), 0, sizeof(*(x)))
|
||||
|
||||
/* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */
|
||||
SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
|
||||
{
|
||||
#if defined(__GNUC__) && defined(i386)
|
||||
int u0, u1, u2;
|
||||
__asm__ __volatile__ (
|
||||
"cld \n\t"
|
||||
"rep ; stosl \n\t"
|
||||
: "=&D" (u0), "=&a" (u1), "=&c" (u2)
|
||||
: "0" (dst), "1" (val), "2" (SDL_static_cast(Uint32, dwords))
|
||||
: "memory"
|
||||
);
|
||||
#else
|
||||
size_t _n = (dwords + 3) / 4;
|
||||
Uint32 *_p = SDL_static_cast(Uint32 *, dst);
|
||||
Uint32 _val = (val);
|
||||
if (dwords == 0)
|
||||
return;
|
||||
switch (dwords % 4)
|
||||
{
|
||||
case 0: do { *_p++ = _val;
|
||||
case 3: *_p++ = _val;
|
||||
case 2: *_p++ = _val;
|
||||
case 1: *_p++ = _val;
|
||||
} while ( --_n );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
extern DECLSPEC void *SDLCALL SDL_memcpy(void *dst, const void *src, size_t len);
|
||||
|
||||
SDL_FORCE_INLINE void *SDL_memcpy4(void *dst, const void *src, size_t dwords)
|
||||
{
|
||||
return SDL_memcpy(dst, src, dwords * 4);
|
||||
}
|
||||
|
||||
extern DECLSPEC void *SDLCALL SDL_memmove(void *dst, const void *src, size_t len);
|
||||
extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);
|
||||
|
||||
extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr);
|
||||
extern DECLSPEC size_t SDLCALL SDL_wcslcpy(wchar_t *dst, const wchar_t *src, size_t maxlen);
|
||||
extern DECLSPEC size_t SDLCALL SDL_wcslcat(wchar_t *dst, const wchar_t *src, size_t maxlen);
|
||||
|
||||
extern DECLSPEC size_t SDLCALL SDL_strlen(const char *str);
|
||||
extern DECLSPEC size_t SDLCALL SDL_strlcpy(char *dst, const char *src, size_t maxlen);
|
||||
extern DECLSPEC size_t SDLCALL SDL_utf8strlcpy(char *dst, const char *src, size_t dst_bytes);
|
||||
extern DECLSPEC size_t SDLCALL SDL_strlcat(char *dst, const char *src, size_t maxlen);
|
||||
extern DECLSPEC char *SDLCALL SDL_strdup(const char *str);
|
||||
extern DECLSPEC char *SDLCALL SDL_strrev(char *str);
|
||||
extern DECLSPEC char *SDLCALL SDL_strupr(char *str);
|
||||
extern DECLSPEC char *SDLCALL SDL_strlwr(char *str);
|
||||
extern DECLSPEC char *SDLCALL SDL_strchr(const char *str, int c);
|
||||
extern DECLSPEC char *SDLCALL SDL_strrchr(const char *str, int c);
|
||||
extern DECLSPEC char *SDLCALL SDL_strstr(const char *haystack, const char *needle);
|
||||
|
||||
extern DECLSPEC char *SDLCALL SDL_itoa(int value, char *str, int radix);
|
||||
extern DECLSPEC char *SDLCALL SDL_uitoa(unsigned int value, char *str, int radix);
|
||||
extern DECLSPEC char *SDLCALL SDL_ltoa(long value, char *str, int radix);
|
||||
extern DECLSPEC char *SDLCALL SDL_ultoa(unsigned long value, char *str, int radix);
|
||||
extern DECLSPEC char *SDLCALL SDL_lltoa(Sint64 value, char *str, int radix);
|
||||
extern DECLSPEC char *SDLCALL SDL_ulltoa(Uint64 value, char *str, int radix);
|
||||
|
||||
extern DECLSPEC int SDLCALL SDL_atoi(const char *str);
|
||||
extern DECLSPEC double SDLCALL SDL_atof(const char *str);
|
||||
extern DECLSPEC long SDLCALL SDL_strtol(const char *str, char **endp, int base);
|
||||
extern DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *str, char **endp, int base);
|
||||
extern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *str, char **endp, int base);
|
||||
extern DECLSPEC Uint64 SDLCALL SDL_strtoull(const char *str, char **endp, int base);
|
||||
extern DECLSPEC double SDLCALL SDL_strtod(const char *str, char **endp);
|
||||
|
||||
extern DECLSPEC int SDLCALL SDL_strcmp(const char *str1, const char *str2);
|
||||
extern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, size_t maxlen);
|
||||
extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2);
|
||||
extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *str2, size_t len);
|
||||
|
||||
extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, const char *fmt, ...);
|
||||
extern DECLSPEC int SDLCALL SDL_vsscanf(const char *text, const char *fmt, va_list ap);
|
||||
extern DECLSPEC int SDLCALL SDL_snprintf(char *text, size_t maxlen, const char *fmt, ...);
|
||||
extern DECLSPEC int SDLCALL SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap);
|
||||
|
||||
#ifndef HAVE_M_PI
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846264338327950288 /* pi */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
extern DECLSPEC double SDLCALL SDL_acos(double x);
|
||||
extern DECLSPEC double SDLCALL SDL_asin(double x);
|
||||
extern DECLSPEC double SDLCALL SDL_atan(double x);
|
||||
extern DECLSPEC double SDLCALL SDL_atan2(double x, double y);
|
||||
extern DECLSPEC double SDLCALL SDL_ceil(double x);
|
||||
extern DECLSPEC double SDLCALL SDL_copysign(double x, double y);
|
||||
extern DECLSPEC double SDLCALL SDL_cos(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_cosf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_fabs(double x);
|
||||
extern DECLSPEC double SDLCALL SDL_floor(double x);
|
||||
extern DECLSPEC double SDLCALL SDL_log(double x);
|
||||
extern DECLSPEC double SDLCALL SDL_pow(double x, double y);
|
||||
extern DECLSPEC double SDLCALL SDL_scalbn(double x, int n);
|
||||
extern DECLSPEC double SDLCALL SDL_sin(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_sinf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_sqrt(double x);
|
||||
|
||||
/* The SDL implementation of iconv() returns these error codes */
|
||||
#define SDL_ICONV_ERROR (size_t)-1
|
||||
#define SDL_ICONV_E2BIG (size_t)-2
|
||||
#define SDL_ICONV_EILSEQ (size_t)-3
|
||||
#define SDL_ICONV_EINVAL (size_t)-4
|
||||
|
||||
/* SDL_iconv_* are now always real symbols/types, not macros or inlined. */
|
||||
typedef struct _SDL_iconv_t *SDL_iconv_t;
|
||||
extern DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open(const char *tocode,
|
||||
const char *fromcode);
|
||||
extern DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd);
|
||||
extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf,
|
||||
size_t * inbytesleft, char **outbuf,
|
||||
size_t * outbytesleft);
|
||||
/**
|
||||
* This function converts a string between encodings in one pass, returning a
|
||||
* string that must be freed with SDL_free() or NULL on error.
|
||||
*/
|
||||
extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
|
||||
const char *fromcode,
|
||||
const char *inbuf,
|
||||
size_t inbytesleft);
|
||||
#define SDL_iconv_utf8_locale(S) SDL_iconv_string("", "UTF-8", S, SDL_strlen(S)+1)
|
||||
#define SDL_iconv_utf8_ucs2(S) (Uint16 *)SDL_iconv_string("UCS-2-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
|
||||
#define SDL_iconv_utf8_ucs4(S) (Uint32 *)SDL_iconv_string("UCS-4-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_stdinc_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,503 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_surface.h
|
||||
*
|
||||
* Header file for ::SDL_Surface definition and management functions.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_surface_h
|
||||
#define _SDL_surface_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_pixels.h"
|
||||
#include "SDL_rect.h"
|
||||
#include "SDL_blendmode.h"
|
||||
#include "SDL_rwops.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \name Surface flags
|
||||
*
|
||||
* These are the currently supported flags for the ::SDL_Surface.
|
||||
*
|
||||
* \internal
|
||||
* Used internally (read-only).
|
||||
*/
|
||||
/* @{ */
|
||||
#define SDL_SWSURFACE 0 /**< Just here for compatibility */
|
||||
#define SDL_PREALLOC 0x00000001 /**< Surface uses preallocated memory */
|
||||
#define SDL_RLEACCEL 0x00000002 /**< Surface is RLE encoded */
|
||||
#define SDL_DONTFREE 0x00000004 /**< Surface is referenced internally */
|
||||
/* @} *//* Surface flags */
|
||||
|
||||
/**
|
||||
* Evaluates to true if the surface needs to be locked before access.
|
||||
*/
|
||||
#define SDL_MUSTLOCK(S) (((S)->flags & SDL_RLEACCEL) != 0)
|
||||
|
||||
/**
|
||||
* \brief A collection of pixels used in software blitting.
|
||||
*
|
||||
* \note This structure should be treated as read-only, except for \c pixels,
|
||||
* which, if not NULL, contains the raw pixel data for the surface.
|
||||
*/
|
||||
typedef struct SDL_Surface
|
||||
{
|
||||
Uint32 flags; /**< Read-only */
|
||||
SDL_PixelFormat *format; /**< Read-only */
|
||||
int w, h; /**< Read-only */
|
||||
int pitch; /**< Read-only */
|
||||
void *pixels; /**< Read-write */
|
||||
|
||||
/** Application data associated with the surface */
|
||||
void *userdata; /**< Read-write */
|
||||
|
||||
/** information needed for surfaces requiring locks */
|
||||
int locked; /**< Read-only */
|
||||
void *lock_data; /**< Read-only */
|
||||
|
||||
/** clipping information */
|
||||
SDL_Rect clip_rect; /**< Read-only */
|
||||
|
||||
/** info for fast blit mapping to other surfaces */
|
||||
struct SDL_BlitMap *map; /**< Private */
|
||||
|
||||
/** Reference count -- used when freeing surface */
|
||||
int refcount; /**< Read-mostly */
|
||||
} SDL_Surface;
|
||||
|
||||
/**
|
||||
* \brief The type of function used for surface blitting functions.
|
||||
*/
|
||||
typedef int (*SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,
|
||||
struct SDL_Surface * dst, SDL_Rect * dstrect);
|
||||
|
||||
/**
|
||||
* Allocate and free an RGB surface.
|
||||
*
|
||||
* If the depth is 4 or 8 bits, an empty palette is allocated for the surface.
|
||||
* If the depth is greater than 8 bits, the pixel format is set using the
|
||||
* flags '[RGB]mask'.
|
||||
*
|
||||
* If the function runs out of memory, it will return NULL.
|
||||
*
|
||||
* \param flags The \c flags are obsolete and should be set to 0.
|
||||
* \param width The width in pixels of the surface to create.
|
||||
* \param height The height in pixels of the surface to create.
|
||||
* \param depth The depth in bits of the surface to create.
|
||||
* \param Rmask The red mask of the surface to create.
|
||||
* \param Gmask The green mask of the surface to create.
|
||||
* \param Bmask The blue mask of the surface to create.
|
||||
* \param Amask The alpha mask of the surface to create.
|
||||
*/
|
||||
extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface
|
||||
(Uint32 flags, int width, int height, int depth,
|
||||
Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
|
||||
extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
|
||||
int width,
|
||||
int height,
|
||||
int depth,
|
||||
int pitch,
|
||||
Uint32 Rmask,
|
||||
Uint32 Gmask,
|
||||
Uint32 Bmask,
|
||||
Uint32 Amask);
|
||||
extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface);
|
||||
|
||||
/**
|
||||
* \brief Set the palette used by a surface.
|
||||
*
|
||||
* \return 0, or -1 if the surface format doesn't use a palette.
|
||||
*
|
||||
* \note A single palette can be shared with many surfaces.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetSurfacePalette(SDL_Surface * surface,
|
||||
SDL_Palette * palette);
|
||||
|
||||
/**
|
||||
* \brief Sets up a surface for directly accessing the pixels.
|
||||
*
|
||||
* Between calls to SDL_LockSurface() / SDL_UnlockSurface(), you can write
|
||||
* to and read from \c surface->pixels, using the pixel format stored in
|
||||
* \c surface->format. Once you are done accessing the surface, you should
|
||||
* use SDL_UnlockSurface() to release it.
|
||||
*
|
||||
* Not all surfaces require locking. If SDL_MUSTLOCK(surface) evaluates
|
||||
* to 0, then you can read and write to the surface at any time, and the
|
||||
* pixel format of the surface will not change.
|
||||
*
|
||||
* No operating system or library calls should be made between lock/unlock
|
||||
* pairs, as critical system locks may be held during this time.
|
||||
*
|
||||
* SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked.
|
||||
*
|
||||
* \sa SDL_UnlockSurface()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface * surface);
|
||||
/** \sa SDL_LockSurface() */
|
||||
extern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface * surface);
|
||||
|
||||
/**
|
||||
* Load a surface from a seekable SDL data stream (memory or file).
|
||||
*
|
||||
* If \c freesrc is non-zero, the stream will be closed after being read.
|
||||
*
|
||||
* The new surface should be freed with SDL_FreeSurface().
|
||||
*
|
||||
* \return the new surface, or NULL if there was an error.
|
||||
*/
|
||||
extern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src,
|
||||
int freesrc);
|
||||
|
||||
/**
|
||||
* Load a surface from a file.
|
||||
*
|
||||
* Convenience macro.
|
||||
*/
|
||||
#define SDL_LoadBMP(file) SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1)
|
||||
|
||||
/**
|
||||
* Save a surface to a seekable SDL data stream (memory or file).
|
||||
*
|
||||
* If \c freedst is non-zero, the stream will be closed after being written.
|
||||
*
|
||||
* \return 0 if successful or -1 if there was an error.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SaveBMP_RW
|
||||
(SDL_Surface * surface, SDL_RWops * dst, int freedst);
|
||||
|
||||
/**
|
||||
* Save a surface to a file.
|
||||
*
|
||||
* Convenience macro.
|
||||
*/
|
||||
#define SDL_SaveBMP(surface, file) \
|
||||
SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1)
|
||||
|
||||
/**
|
||||
* \brief Sets the RLE acceleration hint for a surface.
|
||||
*
|
||||
* \return 0 on success, or -1 if the surface is not valid
|
||||
*
|
||||
* \note If RLE is enabled, colorkey and alpha blending blits are much faster,
|
||||
* but the surface must be locked before directly accessing the pixels.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface * surface,
|
||||
int flag);
|
||||
|
||||
/**
|
||||
* \brief Sets the color key (transparent pixel) in a blittable surface.
|
||||
*
|
||||
* \param surface The surface to update
|
||||
* \param flag Non-zero to enable colorkey and 0 to disable colorkey
|
||||
* \param key The transparent pixel in the native surface format
|
||||
*
|
||||
* \return 0 on success, or -1 if the surface is not valid
|
||||
*
|
||||
* You can pass SDL_RLEACCEL to enable RLE accelerated blits.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface * surface,
|
||||
int flag, Uint32 key);
|
||||
|
||||
/**
|
||||
* \brief Gets the color key (transparent pixel) in a blittable surface.
|
||||
*
|
||||
* \param surface The surface to update
|
||||
* \param key A pointer filled in with the transparent pixel in the native
|
||||
* surface format
|
||||
*
|
||||
* \return 0 on success, or -1 if the surface is not valid or colorkey is not
|
||||
* enabled.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetColorKey(SDL_Surface * surface,
|
||||
Uint32 * key);
|
||||
|
||||
/**
|
||||
* \brief Set an additional color value used in blit operations.
|
||||
*
|
||||
* \param surface The surface to update.
|
||||
* \param r The red color value multiplied into blit operations.
|
||||
* \param g The green color value multiplied into blit operations.
|
||||
* \param b The blue color value multiplied into blit operations.
|
||||
*
|
||||
* \return 0 on success, or -1 if the surface is not valid.
|
||||
*
|
||||
* \sa SDL_GetSurfaceColorMod()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetSurfaceColorMod(SDL_Surface * surface,
|
||||
Uint8 r, Uint8 g, Uint8 b);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Get the additional color value used in blit operations.
|
||||
*
|
||||
* \param surface The surface to query.
|
||||
* \param r A pointer filled in with the current red color value.
|
||||
* \param g A pointer filled in with the current green color value.
|
||||
* \param b A pointer filled in with the current blue color value.
|
||||
*
|
||||
* \return 0 on success, or -1 if the surface is not valid.
|
||||
*
|
||||
* \sa SDL_SetSurfaceColorMod()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetSurfaceColorMod(SDL_Surface * surface,
|
||||
Uint8 * r, Uint8 * g,
|
||||
Uint8 * b);
|
||||
|
||||
/**
|
||||
* \brief Set an additional alpha value used in blit operations.
|
||||
*
|
||||
* \param surface The surface to update.
|
||||
* \param alpha The alpha value multiplied into blit operations.
|
||||
*
|
||||
* \return 0 on success, or -1 if the surface is not valid.
|
||||
*
|
||||
* \sa SDL_GetSurfaceAlphaMod()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetSurfaceAlphaMod(SDL_Surface * surface,
|
||||
Uint8 alpha);
|
||||
|
||||
/**
|
||||
* \brief Get the additional alpha value used in blit operations.
|
||||
*
|
||||
* \param surface The surface to query.
|
||||
* \param alpha A pointer filled in with the current alpha value.
|
||||
*
|
||||
* \return 0 on success, or -1 if the surface is not valid.
|
||||
*
|
||||
* \sa SDL_SetSurfaceAlphaMod()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetSurfaceAlphaMod(SDL_Surface * surface,
|
||||
Uint8 * alpha);
|
||||
|
||||
/**
|
||||
* \brief Set the blend mode used for blit operations.
|
||||
*
|
||||
* \param surface The surface to update.
|
||||
* \param blendMode ::SDL_BlendMode to use for blit blending.
|
||||
*
|
||||
* \return 0 on success, or -1 if the parameters are not valid.
|
||||
*
|
||||
* \sa SDL_GetSurfaceBlendMode()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface * surface,
|
||||
SDL_BlendMode blendMode);
|
||||
|
||||
/**
|
||||
* \brief Get the blend mode used for blit operations.
|
||||
*
|
||||
* \param surface The surface to query.
|
||||
* \param blendMode A pointer filled in with the current blend mode.
|
||||
*
|
||||
* \return 0 on success, or -1 if the surface is not valid.
|
||||
*
|
||||
* \sa SDL_SetSurfaceBlendMode()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface * surface,
|
||||
SDL_BlendMode *blendMode);
|
||||
|
||||
/**
|
||||
* Sets the clipping rectangle for the destination surface in a blit.
|
||||
*
|
||||
* If the clip rectangle is NULL, clipping will be disabled.
|
||||
*
|
||||
* If the clip rectangle doesn't intersect the surface, the function will
|
||||
* return SDL_FALSE and blits will be completely clipped. Otherwise the
|
||||
* function returns SDL_TRUE and blits to the surface will be clipped to
|
||||
* the intersection of the surface area and the clipping rectangle.
|
||||
*
|
||||
* Note that blits are automatically clipped to the edges of the source
|
||||
* and destination surfaces.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface * surface,
|
||||
const SDL_Rect * rect);
|
||||
|
||||
/**
|
||||
* Gets the clipping rectangle for the destination surface in a blit.
|
||||
*
|
||||
* \c rect must be a pointer to a valid rectangle which will be filled
|
||||
* with the correct values.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface * surface,
|
||||
SDL_Rect * rect);
|
||||
|
||||
/**
|
||||
* Creates a new surface of the specified format, and then copies and maps
|
||||
* the given surface to it so the blit of the converted surface will be as
|
||||
* fast as possible. If this function fails, it returns NULL.
|
||||
*
|
||||
* The \c flags parameter is passed to SDL_CreateRGBSurface() and has those
|
||||
* semantics. You can also pass ::SDL_RLEACCEL in the flags parameter and
|
||||
* SDL will try to RLE accelerate colorkey and alpha blits in the resulting
|
||||
* surface.
|
||||
*/
|
||||
extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface
|
||||
(SDL_Surface * src, const SDL_PixelFormat * fmt, Uint32 flags);
|
||||
extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurfaceFormat
|
||||
(SDL_Surface * src, Uint32 pixel_format, Uint32 flags);
|
||||
|
||||
/**
|
||||
* \brief Copy a block of pixels of one format to another format
|
||||
*
|
||||
* \return 0 on success, or -1 if there was an error
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_ConvertPixels(int width, int height,
|
||||
Uint32 src_format,
|
||||
const void * src, int src_pitch,
|
||||
Uint32 dst_format,
|
||||
void * dst, int dst_pitch);
|
||||
|
||||
/**
|
||||
* Performs a fast fill of the given rectangle with \c color.
|
||||
*
|
||||
* If \c rect is NULL, the whole surface will be filled with \c color.
|
||||
*
|
||||
* The color should be a pixel of the format used by the surface, and
|
||||
* can be generated by the SDL_MapRGB() function.
|
||||
*
|
||||
* \return 0 on success, or -1 on error.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_FillRect
|
||||
(SDL_Surface * dst, const SDL_Rect * rect, Uint32 color);
|
||||
extern DECLSPEC int SDLCALL SDL_FillRects
|
||||
(SDL_Surface * dst, const SDL_Rect * rects, int count, Uint32 color);
|
||||
|
||||
/**
|
||||
* Performs a fast blit from the source surface to the destination surface.
|
||||
*
|
||||
* This assumes that the source and destination rectangles are
|
||||
* the same size. If either \c srcrect or \c dstrect are NULL, the entire
|
||||
* surface (\c src or \c dst) is copied. The final blit rectangles are saved
|
||||
* in \c srcrect and \c dstrect after all clipping is performed.
|
||||
*
|
||||
* \return If the blit is successful, it returns 0, otherwise it returns -1.
|
||||
*
|
||||
* The blit function should not be called on a locked surface.
|
||||
*
|
||||
* The blit semantics for surfaces with and without blending and colorkey
|
||||
* are defined as follows:
|
||||
* \verbatim
|
||||
RGBA->RGB:
|
||||
Source surface blend mode set to SDL_BLENDMODE_BLEND:
|
||||
alpha-blend (using the source alpha-channel and per-surface alpha)
|
||||
SDL_SRCCOLORKEY ignored.
|
||||
Source surface blend mode set to SDL_BLENDMODE_NONE:
|
||||
copy RGB.
|
||||
if SDL_SRCCOLORKEY set, only copy the pixels matching the
|
||||
RGB values of the source color key, ignoring alpha in the
|
||||
comparison.
|
||||
|
||||
RGB->RGBA:
|
||||
Source surface blend mode set to SDL_BLENDMODE_BLEND:
|
||||
alpha-blend (using the source per-surface alpha)
|
||||
Source surface blend mode set to SDL_BLENDMODE_NONE:
|
||||
copy RGB, set destination alpha to source per-surface alpha value.
|
||||
both:
|
||||
if SDL_SRCCOLORKEY set, only copy the pixels matching the
|
||||
source color key.
|
||||
|
||||
RGBA->RGBA:
|
||||
Source surface blend mode set to SDL_BLENDMODE_BLEND:
|
||||
alpha-blend (using the source alpha-channel and per-surface alpha)
|
||||
SDL_SRCCOLORKEY ignored.
|
||||
Source surface blend mode set to SDL_BLENDMODE_NONE:
|
||||
copy all of RGBA to the destination.
|
||||
if SDL_SRCCOLORKEY set, only copy the pixels matching the
|
||||
RGB values of the source color key, ignoring alpha in the
|
||||
comparison.
|
||||
|
||||
RGB->RGB:
|
||||
Source surface blend mode set to SDL_BLENDMODE_BLEND:
|
||||
alpha-blend (using the source per-surface alpha)
|
||||
Source surface blend mode set to SDL_BLENDMODE_NONE:
|
||||
copy RGB.
|
||||
both:
|
||||
if SDL_SRCCOLORKEY set, only copy the pixels matching the
|
||||
source color key.
|
||||
\endverbatim
|
||||
*
|
||||
* You should call SDL_BlitSurface() unless you know exactly how SDL
|
||||
* blitting works internally and how to use the other blit functions.
|
||||
*/
|
||||
#define SDL_BlitSurface SDL_UpperBlit
|
||||
|
||||
/**
|
||||
* This is the public blit function, SDL_BlitSurface(), and it performs
|
||||
* rectangle validation and clipping before passing it to SDL_LowerBlit()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_UpperBlit
|
||||
(SDL_Surface * src, const SDL_Rect * srcrect,
|
||||
SDL_Surface * dst, SDL_Rect * dstrect);
|
||||
|
||||
/**
|
||||
* This is a semi-private blit function and it performs low-level surface
|
||||
* blitting only.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_LowerBlit
|
||||
(SDL_Surface * src, SDL_Rect * srcrect,
|
||||
SDL_Surface * dst, SDL_Rect * dstrect);
|
||||
|
||||
/**
|
||||
* \brief Perform a fast, low quality, stretch blit between two surfaces of the
|
||||
* same pixel format.
|
||||
*
|
||||
* \note This function uses a static buffer, and is not thread-safe.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src,
|
||||
const SDL_Rect * srcrect,
|
||||
SDL_Surface * dst,
|
||||
const SDL_Rect * dstrect);
|
||||
|
||||
#define SDL_BlitScaled SDL_UpperBlitScaled
|
||||
|
||||
/**
|
||||
* This is the public scaled blit function, SDL_BlitScaled(), and it performs
|
||||
* rectangle validation and clipping before passing it to SDL_LowerBlitScaled()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_UpperBlitScaled
|
||||
(SDL_Surface * src, const SDL_Rect * srcrect,
|
||||
SDL_Surface * dst, SDL_Rect * dstrect);
|
||||
|
||||
/**
|
||||
* This is a semi-private blit function and it performs low-level surface
|
||||
* scaled blitting only.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_LowerBlitScaled
|
||||
(SDL_Surface * src, SDL_Rect * srcrect,
|
||||
SDL_Surface * dst, SDL_Rect * dstrect);
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_surface_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,191 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_system.h
|
||||
*
|
||||
* Include file for platform specific SDL API functions
|
||||
*/
|
||||
|
||||
#ifndef _SDL_system_h
|
||||
#define _SDL_system_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_keyboard.h"
|
||||
#include "SDL_render.h"
|
||||
#include "SDL_video.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Platform specific functions for Windows */
|
||||
#ifdef __WIN32__
|
||||
|
||||
/* Returns the D3D9 adapter index that matches the specified display index.
|
||||
This adapter index can be passed to IDirect3D9::CreateDevice and controls
|
||||
on which monitor a full screen application will appear.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_Direct3D9GetAdapterIndex( int displayIndex );
|
||||
|
||||
/* Returns the D3D device associated with a renderer, or NULL if it's not a D3D renderer.
|
||||
Once you are done using the device, you should release it to avoid a resource leak.
|
||||
*/
|
||||
typedef struct IDirect3DDevice9 IDirect3DDevice9;
|
||||
extern DECLSPEC IDirect3DDevice9* SDLCALL SDL_RenderGetD3D9Device(SDL_Renderer * renderer);
|
||||
|
||||
/* Returns the DXGI Adapter and Output indices for the specified display index.
|
||||
These can be passed to EnumAdapters and EnumOutputs respectively to get the objects
|
||||
required to create a DX10 or DX11 device and swap chain.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *adapterIndex, int *outputIndex );
|
||||
|
||||
#endif /* __WIN32__ */
|
||||
|
||||
|
||||
/* Platform specific functions for iOS */
|
||||
#if defined(__IPHONEOS__) && __IPHONEOS__
|
||||
|
||||
extern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam);
|
||||
extern DECLSPEC void SDLCALL SDL_iPhoneSetEventPump(SDL_bool enabled);
|
||||
|
||||
#endif /* __IPHONEOS__ */
|
||||
|
||||
|
||||
/* Platform specific functions for Android */
|
||||
#if defined(__ANDROID__) && __ANDROID__
|
||||
|
||||
/* Get the JNI environment for the current thread
|
||||
This returns JNIEnv*, but the prototype is void* so we don't need jni.h
|
||||
*/
|
||||
extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv();
|
||||
|
||||
/* Get the SDL Activity object for the application
|
||||
This returns jobject, but the prototype is void* so we don't need jni.h
|
||||
The jobject returned by SDL_AndroidGetActivity is a local reference.
|
||||
It is the caller's responsibility to properly release it
|
||||
(using env->Push/PopLocalFrame or manually with env->DeleteLocalRef)
|
||||
*/
|
||||
extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity();
|
||||
|
||||
/* See the official Android developer guide for more information:
|
||||
http://developer.android.com/guide/topics/data/data-storage.html
|
||||
*/
|
||||
#define SDL_ANDROID_EXTERNAL_STORAGE_READ 0x01
|
||||
#define SDL_ANDROID_EXTERNAL_STORAGE_WRITE 0x02
|
||||
|
||||
/* Get the path used for internal storage for this application.
|
||||
This path is unique to your application and cannot be written to
|
||||
by other applications.
|
||||
*/
|
||||
extern DECLSPEC const char * SDLCALL SDL_AndroidGetInternalStoragePath();
|
||||
|
||||
/* Get the current state of external storage, a bitmask of these values:
|
||||
SDL_ANDROID_EXTERNAL_STORAGE_READ
|
||||
SDL_ANDROID_EXTERNAL_STORAGE_WRITE
|
||||
If external storage is currently unavailable, this will return 0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AndroidGetExternalStorageState();
|
||||
|
||||
/* Get the path used for external storage for this application.
|
||||
This path is unique to your application, but is public and can be
|
||||
written to by other applications.
|
||||
*/
|
||||
extern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath();
|
||||
|
||||
#endif /* __ANDROID__ */
|
||||
|
||||
/* Platform specific functions for WinRT */
|
||||
#if defined(__WINRT__) && __WINRT__
|
||||
|
||||
/**
|
||||
* \brief WinRT / Windows Phone path types
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
/** \brief The installed app's root directory.
|
||||
Files here are likely to be read-only. */
|
||||
SDL_WINRT_PATH_INSTALLED_LOCATION,
|
||||
|
||||
/** \brief The app's local data store. Files may be written here */
|
||||
SDL_WINRT_PATH_LOCAL_FOLDER,
|
||||
|
||||
/** \brief The app's roaming data store. Unsupported on Windows Phone.
|
||||
Files written here may be copied to other machines via a network
|
||||
connection.
|
||||
*/
|
||||
SDL_WINRT_PATH_ROAMING_FOLDER,
|
||||
|
||||
/** \brief The app's temporary data store. Unsupported on Windows Phone.
|
||||
Files written here may be deleted at any time. */
|
||||
SDL_WINRT_PATH_TEMP_FOLDER
|
||||
} SDL_WinRT_Path;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Retrieves a WinRT defined path on the local file system
|
||||
*
|
||||
* \note Documentation on most app-specific path types on WinRT
|
||||
* can be found on MSDN, at the URL:
|
||||
* http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
|
||||
*
|
||||
* \param pathType The type of path to retrieve.
|
||||
* \ret A UCS-2 string (16-bit, wide-char) containing the path, or NULL
|
||||
* if the path is not available for any reason. Not all paths are
|
||||
* available on all versions of Windows. This is especially true on
|
||||
* Windows Phone. Check the documentation for the given
|
||||
* SDL_WinRT_Path for more information on which path types are
|
||||
* supported where.
|
||||
*/
|
||||
extern DECLSPEC const wchar_t * SDLCALL SDL_WinRTGetFSPathUNICODE(SDL_WinRT_Path pathType);
|
||||
|
||||
/**
|
||||
* \brief Retrieves a WinRT defined path on the local file system
|
||||
*
|
||||
* \note Documentation on most app-specific path types on WinRT
|
||||
* can be found on MSDN, at the URL:
|
||||
* http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
|
||||
*
|
||||
* \param pathType The type of path to retrieve.
|
||||
* \ret A UTF-8 string (8-bit, multi-byte) containing the path, or NULL
|
||||
* if the path is not available for any reason. Not all paths are
|
||||
* available on all versions of Windows. This is especially true on
|
||||
* Windows Phone. Check the documentation for the given
|
||||
* SDL_WinRT_Path for more information on which path types are
|
||||
* supported where.
|
||||
*/
|
||||
extern DECLSPEC const char * SDLCALL SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathType);
|
||||
|
||||
#endif /* __WINRT__ */
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_system_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,272 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_syswm.h
|
||||
*
|
||||
* Include file for SDL custom system window manager hooks.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_syswm_h
|
||||
#define _SDL_syswm_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_video.h"
|
||||
#include "SDL_version.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \file SDL_syswm.h
|
||||
*
|
||||
* Your application has access to a special type of event ::SDL_SYSWMEVENT,
|
||||
* which contains window-manager specific information and arrives whenever
|
||||
* an unhandled window event occurs. This event is ignored by default, but
|
||||
* you can enable it with SDL_EventState().
|
||||
*/
|
||||
#ifdef SDL_PROTOTYPES_ONLY
|
||||
struct SDL_SysWMinfo;
|
||||
#else
|
||||
|
||||
#if defined(SDL_VIDEO_DRIVER_WINDOWS)
|
||||
//#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#if defined(SDL_VIDEO_DRIVER_WINRT)
|
||||
#include <Inspectable.h>
|
||||
#endif
|
||||
|
||||
/* This is the structure for custom window manager events */
|
||||
#if defined(SDL_VIDEO_DRIVER_X11)
|
||||
#if defined(__APPLE__) && defined(__MACH__)
|
||||
/* conflicts with Quickdraw.h */
|
||||
#define Cursor X11Cursor
|
||||
#endif
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xatom.h>
|
||||
|
||||
#if defined(__APPLE__) && defined(__MACH__)
|
||||
/* matches the re-define above */
|
||||
#undef Cursor
|
||||
#endif
|
||||
|
||||
#endif /* defined(SDL_VIDEO_DRIVER_X11) */
|
||||
|
||||
#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
|
||||
#include <directfb.h>
|
||||
#endif
|
||||
|
||||
#if defined(SDL_VIDEO_DRIVER_COCOA)
|
||||
#ifdef __OBJC__
|
||||
#include <Cocoa/Cocoa.h>
|
||||
#else
|
||||
typedef struct _NSWindow NSWindow;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(SDL_VIDEO_DRIVER_UIKIT)
|
||||
#ifdef __OBJC__
|
||||
#include <UIKit/UIKit.h>
|
||||
#else
|
||||
typedef struct _UIWindow UIWindow;
|
||||
typedef struct _UIViewController UIViewController;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(SDL_VIDEO_DRIVER_MIR)
|
||||
#include <mir_toolkit/mir_client_library.h>
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* These are the various supported windowing subsystems
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_SYSWM_UNKNOWN,
|
||||
SDL_SYSWM_WINDOWS,
|
||||
SDL_SYSWM_X11,
|
||||
SDL_SYSWM_DIRECTFB,
|
||||
SDL_SYSWM_COCOA,
|
||||
SDL_SYSWM_UIKIT,
|
||||
SDL_SYSWM_WAYLAND,
|
||||
SDL_SYSWM_MIR,
|
||||
SDL_SYSWM_WINRT,
|
||||
} SDL_SYSWM_TYPE;
|
||||
|
||||
/**
|
||||
* The custom event structure.
|
||||
*/
|
||||
struct SDL_SysWMmsg
|
||||
{
|
||||
SDL_version version;
|
||||
SDL_SYSWM_TYPE subsystem;
|
||||
union
|
||||
{
|
||||
#if defined(SDL_VIDEO_DRIVER_WINDOWS)
|
||||
struct {
|
||||
HWND hwnd; /**< The window for the message */
|
||||
UINT msg; /**< The type of message */
|
||||
WPARAM wParam; /**< WORD message parameter */
|
||||
LPARAM lParam; /**< LONG message parameter */
|
||||
} win;
|
||||
#endif
|
||||
#if defined(SDL_VIDEO_DRIVER_X11)
|
||||
struct {
|
||||
XEvent event;
|
||||
} x11;
|
||||
#endif
|
||||
#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
|
||||
struct {
|
||||
DFBEvent event;
|
||||
} dfb;
|
||||
#endif
|
||||
#if defined(SDL_VIDEO_DRIVER_COCOA)
|
||||
struct
|
||||
{
|
||||
/* No Cocoa window events yet */
|
||||
} cocoa;
|
||||
#endif
|
||||
#if defined(SDL_VIDEO_DRIVER_UIKIT)
|
||||
struct
|
||||
{
|
||||
/* No UIKit window events yet */
|
||||
} uikit;
|
||||
#endif
|
||||
/* Can't have an empty union */
|
||||
int dummy;
|
||||
} msg;
|
||||
};
|
||||
|
||||
/**
|
||||
* The custom window manager information structure.
|
||||
*
|
||||
* When this structure is returned, it holds information about which
|
||||
* low level system it is using, and will be one of SDL_SYSWM_TYPE.
|
||||
*/
|
||||
struct SDL_SysWMinfo
|
||||
{
|
||||
SDL_version version;
|
||||
SDL_SYSWM_TYPE subsystem;
|
||||
union
|
||||
{
|
||||
#if defined(SDL_VIDEO_DRIVER_WINDOWS)
|
||||
struct
|
||||
{
|
||||
HWND window; /**< The window handle */
|
||||
} win;
|
||||
#endif
|
||||
#if defined(SDL_VIDEO_DRIVER_WINRT)
|
||||
struct
|
||||
{
|
||||
IInspectable * window; /**< The WinRT CoreWindow */
|
||||
} winrt;
|
||||
#endif
|
||||
#if defined(SDL_VIDEO_DRIVER_X11)
|
||||
struct
|
||||
{
|
||||
Display *display; /**< The X11 display */
|
||||
Window window; /**< The X11 window */
|
||||
} x11;
|
||||
#endif
|
||||
#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
|
||||
struct
|
||||
{
|
||||
IDirectFB *dfb; /**< The directfb main interface */
|
||||
IDirectFBWindow *window; /**< The directfb window handle */
|
||||
IDirectFBSurface *surface; /**< The directfb client surface */
|
||||
} dfb;
|
||||
#endif
|
||||
#if defined(SDL_VIDEO_DRIVER_COCOA)
|
||||
struct
|
||||
{
|
||||
NSWindow *window; /* The Cocoa window */
|
||||
} cocoa;
|
||||
#endif
|
||||
#if defined(SDL_VIDEO_DRIVER_UIKIT)
|
||||
struct
|
||||
{
|
||||
UIWindow *window; /* The UIKit window */
|
||||
} uikit;
|
||||
#endif
|
||||
#if defined(SDL_VIDEO_DRIVER_WAYLAND)
|
||||
struct
|
||||
{
|
||||
struct wl_display *display; /**< Wayland display */
|
||||
struct wl_surface *surface; /**< Wayland surface */
|
||||
struct wl_shell_surface *shell_surface; /**< Wayland shell_surface (window manager handle) */
|
||||
} wl;
|
||||
#endif
|
||||
#if defined(SDL_VIDEO_DRIVER_MIR)
|
||||
struct
|
||||
{
|
||||
MirConnection *connection; /**< Mir display server connection */
|
||||
MirSurface *surface; /**< Mir surface */
|
||||
} mir;
|
||||
#endif
|
||||
|
||||
/* Can't have an empty union */
|
||||
int dummy;
|
||||
} info;
|
||||
};
|
||||
|
||||
#endif /* SDL_PROTOTYPES_ONLY */
|
||||
|
||||
typedef struct SDL_SysWMinfo SDL_SysWMinfo;
|
||||
|
||||
/* Function prototypes */
|
||||
/**
|
||||
* \brief This function allows access to driver-dependent window information.
|
||||
*
|
||||
* \param window The window about which information is being requested
|
||||
* \param info This structure must be initialized with the SDL version, and is
|
||||
* then filled in with information about the given window.
|
||||
*
|
||||
* \return SDL_TRUE if the function is implemented and the version member of
|
||||
* the \c info struct is valid, SDL_FALSE otherwise.
|
||||
*
|
||||
* You typically use this function like this:
|
||||
* \code
|
||||
* SDL_SysWMinfo info;
|
||||
* SDL_VERSION(&info.version);
|
||||
* if ( SDL_GetWindowWMInfo(window, &info) ) { ... }
|
||||
* \endcode
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowWMInfo(SDL_Window * window,
|
||||
SDL_SysWMinfo * info);
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_syswm_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_test.h
|
||||
*
|
||||
* Include file for SDL test framework.
|
||||
*
|
||||
* This code is a part of the SDL2_test library, not the main SDL library.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_test_h
|
||||
#define _SDL_test_h
|
||||
|
||||
#include "SDL.h"
|
||||
#include "SDL_test_common.h"
|
||||
#include "SDL_test_font.h"
|
||||
#include "SDL_test_random.h"
|
||||
#include "SDL_test_fuzzer.h"
|
||||
#include "SDL_test_crc32.h"
|
||||
#include "SDL_test_md5.h"
|
||||
#include "SDL_test_log.h"
|
||||
#include "SDL_test_assert.h"
|
||||
#include "SDL_test_harness.h"
|
||||
#include "SDL_test_images.h"
|
||||
#include "SDL_test_compare.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Global definitions */
|
||||
|
||||
/*
|
||||
* Note: Maximum size of SDLTest log message is less than SDLs limit
|
||||
* to ensure we can fit additional information such as the timestamp.
|
||||
*/
|
||||
#define SDLTEST_MAX_LOGMESSAGE_LENGTH 3584
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_test_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -0,0 +1,105 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_test_assert.h
|
||||
*
|
||||
* Include file for SDL test framework.
|
||||
*
|
||||
* This code is a part of the SDL2_test library, not the main SDL library.
|
||||
*/
|
||||
|
||||
/*
|
||||
*
|
||||
* Assert API for test code and test cases
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SDL_test_assert_h
|
||||
#define _SDL_test_assert_h
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Fails the assert.
|
||||
*/
|
||||
#define ASSERT_FAIL 0
|
||||
|
||||
/**
|
||||
* \brief Passes the assert.
|
||||
*/
|
||||
#define ASSERT_PASS 1
|
||||
|
||||
/**
|
||||
* \brief Assert that logs and break execution flow on failures.
|
||||
*
|
||||
* \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0).
|
||||
* \param assertDescription Message to log with the assert describing it.
|
||||
*/
|
||||
void SDLTest_Assert(int assertCondition, const char *assertDescription, ...);
|
||||
|
||||
/**
|
||||
* \brief Assert for test cases that logs but does not break execution flow on failures. Updates assertion counters.
|
||||
*
|
||||
* \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0).
|
||||
* \param assertDescription Message to log with the assert describing it.
|
||||
*
|
||||
* \returns Returns the assertCondition so it can be used to externally to break execution flow if desired.
|
||||
*/
|
||||
int SDLTest_AssertCheck(int assertCondition, const char *assertDescription, ...);
|
||||
|
||||
/**
|
||||
* \brief Explicitely pass without checking an assertion condition. Updates assertion counter.
|
||||
*
|
||||
* \param assertDescription Message to log with the assert describing it.
|
||||
*/
|
||||
void SDLTest_AssertPass(const char *assertDescription, ...);
|
||||
|
||||
/**
|
||||
* \brief Resets the assert summary counters to zero.
|
||||
*/
|
||||
void SDLTest_ResetAssertSummary();
|
||||
|
||||
/**
|
||||
* \brief Logs summary of all assertions (total, pass, fail) since last reset as INFO or ERROR.
|
||||
*/
|
||||
void SDLTest_LogAssertSummary();
|
||||
|
||||
|
||||
/**
|
||||
* \brief Converts the current assert summary state to a test result.
|
||||
*
|
||||
* \returns TEST_RESULT_PASSED, TEST_RESULT_FAILED, or TEST_RESULT_NO_ASSERT
|
||||
*/
|
||||
int SDLTest_AssertSummaryToTestResult();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_test_assert_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue