### Hype: The Time Quest - 16:9 Widescreen Patch (SPANISH VERSION ONLY) ###

How to use:
- Replace the file MaiDFXvr_bleu.exe with the one in this archive.
- Install nGlide (NOTE: no other Glide wrapper will work, since this fix uses a particular feature of nGlide).
- Set the desired resolution in the nGlide configurator (e.g. 1920x1080 for full HD).
- Optional (BUT HIGHLY RECOMMENDED): Set "Vulkan" as the video backend in the nGlide configurator (I experienced lots of random crashes with the directX backend; Vulkan seems to work pretty well with this game)

Known issues:
- The magic-energy meter (the circle around the currently selected magic symbol) on the inventory screen is slightly misplaced.
- The game's INTERNAL x-resolution is always set to 640 (one could change that, but that moves around some HUD-elements on screen and I didn't want to deal with that). This has a couple of consequences:
	a) The internal y-resolution was rounded to the nearest integer whenever the aspect ratio counldn't be written as 640/y, where y is an integer. This only affects 25:16 (which is actually 640:410) and 21:9 (which is actually 640:274). Should you encounter small black bars on either side of the screen, make sure that in the nGlide configurator, "Aspect ratio" is set to "Entire Screen" rather than "Aspect correction".
	b) The lower internal y-resolution causes the background images in the main menu, loading screen and inventory screen to be downscaled. This is particularly noticable in the 32:9 version of the patch, where the internal y-resolution is only 180.
	
For a more technical details on how this patch works, see the following discussion on the Rayman Pirate-Community forums: https://raymanpc.com/forum/viewtopic.php?t=31049


### Instructions for other Aspect Ratios ###

(SPANISH VERSION ONLY, the English patch already includes binaries for various aspect ratios)

For other aspect ratios (e.g. 16:10), open the binary in this archive (NOT the original MaiDFXvr_bleu.exe) in a HEX editor, and edit the values at the following offsets:

1.	Offset: 0008C7C6. Length: 4 Bytes. Default: 80 02 68 01. Description: This specifies the dimensions of the Glide rendering window.
	Change to: First, write your desired aspect ratio as 640/y, where y is an integer (e.g. y = 360 foor 16:9). If y = 640/AR (AR = "Aspect Ratio) is not an integer, round to the nearest integer. Next, write the x and y resolution as a 4 digit HEX number (e.g. x = 640(DEC) = 0280(HEX) and y = 360(DEC) = 0168(HEX)). Next, flip the first two and last two digits of these HEX numbers (e.g. 0280 -> 8002 and 0168 -> 6801. Finally, concatenate the two HEX numbers (e.g. 8002 and 6801 -> 80 02 68 01).
	Some values: 15:9: 80 02 80 01, 16:10: 80 02 90 01, 21:9: 80 02 12 01, 25:16: 80 02 9A 01, 32:9: 80 02 B4 00.
	Note: If you want to play using dgVoodoo instead of nGlide, you need to replace these for bytes & the preceding byte by 6A 07 90 90 90 (i.e. 6880026801 -> 6A07909090). Then follow the instructions in the following post: https://raymanpc.com/forum/viewtopic.php?p=1431148#p1431148.
2.	Offset: 00067E9B. Length: 2 Bytes. Default: 68 01. Description: Specifies the y-resolution of what is rendered inside the Glide rendering window.
	Change to: Same as the second two bytes computed in step 1.
	Some values: 15:9: 80 01, 16:10: 90 01, 21:9: 12 01, 25:16: 9A 01, 32:9: B4 00.
3.	Offset: 00032AF5. Length: 4 Bytes (float). Default 00 00 54 C2 (= -53.0). Description: This float determines the vertical placement of the magic energy circle.
	Change to: It's best to load this value into Cheat Engine and experiment with it until it fits the magic icon. Use a tool to convert the float value to a 4 byte HEX (google HEX to float), and remember to reverse the order of the bytes, before you write it into the binary (e.g. -53.0 = C2540000(HEX) -> 000054C2).
	Some values (probably not perfect): 15:9: 00 00 30 C2, 16:10: 00 00 18 C2, 21:9: 00 00 AA C2, 25:16: 00 00 0C C2, 32:9: 00 00 EE C2.
4.	Offset: 00032AF9. Length: 4 Bytes (float). Default 00 00 70 41 (= 15.0). Description: This float determines the vertical stretching of the magic energy circle.
	Change to: It's best to load this value into Cheat Engine and experiment with it until it fits the magic icon. Use a tool to convert the float value to a 4 byte HEX (google HEX to float), and remember to reverse the order of the bytes, before you write it into the binary (e.g. 15.0 = 41700000(HEX) -> 00007041).
	Some values (probably not perfect): 15:9: 00 00 50 41, 16:10: 00 00 20 41, 21:9: 00 00 D0 41, 25:16: 00 00 10 41, 32:9: 00 00 20 42.
5.	Offset: 00191CD1. Length: 4 Bytes (float). Default A6 9B E4 3F (= 1.786). Description: This float determines the FOV.
	Change to: Compute the FOV, using the following formula: 2*ATAN(TAN(1.5/2)*3/4*AR) (AR = "Aspect Ratio"). Example: 2*ATAN(TAN(1.5/2)*3/4*16/9) = 1.786. Use a tool to convert the float value to a 4 byte HEX (google HEX to float), and remember to reverse the order of the bytes, before you write it into the binary (e.g. 1.786 = 3FE49BA6(HEX) -> A69BE43F).
	Some values: 15:9: DA 7A DC 3F, 16:10: D5 4C D7 3F, 21:9: FA B1 02 40, 25:16: AF 27 D4 3F, 32:9: E1 13 18 40.