Out of the Park Developments Online Manuals. Welcome to Out of the Park Baseball 1. Out of the Park Baseball ("OOTP") is the most sophisticated and best- selling baseball simulation game on the planet. Since its inception, OOTP has won numerous awards, including multiple "Sports Game of the Year" awards, en route to becoming the most immersive, realistic, and customizable baseball experience a fan can ask for! OOTP has an amazing number of options designed to allow you to create your ideal baseball simulation. This in- depth manual will walk you through OOTP in all of its glory!
A successful manager in OOTP needs to know more than just what screens exist. He needs to understand the core concepts of the game. This section of the online manual. Mickey Jones - Double Bogey Blues Chords by Misc Unsigned Bands with guitar chords and tabs. Best version of Mickey Jones - Double Bogey Blues Chords available. Take a closer look at the 2 Gb limit that we are plagued with in different languages, and how to get around them.
You can navigate sequentially through the manual by using the "Next Page" and "Previous Page" links at the bottom of the page. If you enjoy reading manuals, the manual is designed to gradually build your understanding of the game in a naturally flowing order. You can also click on the headings along the left if you wish to jump to a particular section of the manual. You can use also the search function in the top right to search by keyword.
We hope you enjoy OOTP as much as we enjoyed making it for you!
Getting Past the 2 Gb File Limit. Having gotten a basic understanding of the previous three APIs, you now can look at making the first few sub routines in your VB6 Module. But, there's one problem: The API's expect the Low and High 3.
Also, the APIs return unsigned values. So, the first thing you have to do is decide on a variable type that you can use to store values higher than 2 Gb. After some serious thought, I decided to use a Currency type (6. Now that you have your Currency type to hold the file size and position info, you need two functions to convert them to and from the signed 3.
VB6. Private Sub Size. Long(By. Val File. Size As Currency, _.
By. Ref Long. Low As Long, By. Ref Long. High As Long). HFFFFFFFF unsigned = 4.
Dim Cutoff As Currency. Cutoff = 2. 14. 74. Cutoff = Cutoff + 2. Cutoff = Cutoff + 1.
I have long told fellow developers that trying to stick to tables that have entirely fixed width columns is good practice. This tends to lead to, at the least.
Do Until File. Size < Cutoff. Long. High = Long. High + 1. File. Size = File. Size - Cutoff. If File.
Size > 2. 14. 74. Then. Long. Low = - CLng(Cutoff - (File.
Size - 1)). Long. Low = CLng(File. Size).
Look closer at what you are doing: Cutoff is a temporary, Currency type, variable that you use to hold the value of an unsigned 3. Because VB6 uses Longs to store numbers in the IDE, you have to work around it a little by adding the biggest positive number possible (2. This looks a bit like it could be done easier, but there is no other method in the VB6 IDE. Next, you work out the higher 3. This code looks like it could be done with a simple division, but you have the problem of the IDE using longs. So, rather than running the risk of the IDE using a long somewhere in the calculations (tests have returned varied results where the division is often 1 out on certain file sizes), you may find a division method that will give the correct value every time, but for now this method will suffice.
With your max filesize being 9. Gb, the highest value that Long. High will hold is 2. Max positive value that a Long can hold. This means that you do not need to monitor it. Something to note: If the filesize is smaller than 4 Gb, the Do loop does not execute.
Between 4 and 8 Gb the Do loop executes once; between 8 and 1. Gb, it executes twice. Som using this loop will have a very minor effect on performance.
Next, take the remainder and decide whether it needs the Sign bit of the long to hold a value (& H8. If it's smaller than 2. H8. 00. 00. 00. 0 Unsigned), you can pass the value directly to your Long (Long. Low); if not, you have to convert the value to the hex equivalent in Signed 3. Now, you need to look at converting two Long values into one Currency value. VB6. Private Sub Long.
Size(By. Val Long. Low As Long, _. By. Val Long. High As Long, _. By. Ref File. Size As Currency). Dim Cutoff As Currency. Cutoff = 2. 14. 74.
Cutoff = Cutoff + 2. Cutoff = Cutoff + 1. File. Size = Cutoff * Long. High. If Long. Low < 0 Then. File. Size = File.
Size + (Cutoff + (Long. Low + 1)). File. Size = File. Size + Long. Low. Here, you are doing pretty much the same calculations, except that you are rebuilding the Currency value from two Long values. The multiplication here does not give any erroneous results, but note that the currency type variable must be listed first; otherwise, VB will try to use a Long type variable to temporally store the result.
This is one of the minor issues in VB6. When doing calculations, VB uses the same variable type of your first variable in the calculation and not the variable type of the destination variable. This has been documented on several sites so I'm not going too much into it.)Without a clear understanding of variable types and limits in C++, I'm unable to duplicate these functions in C++. VB . NET, on the other hand, has opened up the available variables, giving yu signed and unsigned 8- bit, 1. By using these newly available variables, your two functions now are very easy to code. VB6. Private Sub Size.
Long(By. Val File. Size As u. Long, _. By. Ref Long. Low As u. Integer, _. By. Ref Long. High As u. Integer). HFFFFFFFF unsigned = 4. Long. High = (File.
Size And & HFFFFFFFF0. H1. 00. 00. 00. 00. Long. Low = File. Size And & HFFFFFFFF.
Private Sub Long. Size(By. Val Long. Low As u. Integer, _. By. Val Long. High As u. Integer, _. By. Ref File. Size As u. Long).
File. Size = (Long. High * & H1. 00. Or Long. Low. These two functions are very straightforward in VB . NET because you now have the ability to use unsigned variables. Also, VB . NET does not have the IDE restrictions of VB6.
Now, having prepared your conversion functions, you can start with your API functions. The first one you will write is the Filesize API function. That's because the Openfile function will use the Filesize function to return the filesize upon opening the file (a value- added feature that the standard Open does not have). VB6. Public Sub API_File. Size(By. Val File. Number As Long, _.
By. Ref File. Size As Currency). Dim File. Size. L As Long. Dim File. Size. H As Long. File. Size. L = Get.
File. Size(File. Number, File. Size. H). Long. 2Size File. Size. L, File. Size. H, File. Size. Public Sub API_File. Size(By. Val File. Number As UInteger, _. By. Ref File. Size As ULong).
Dim File. Size. L As UInteger. Dim File. Size. H As UInteger. File. Size. L = Get. File. Size(File. Number, File. Size. H). Long. 2Size(File. Size. L, File. Size.
H, File. Size). In this function, you passed the API Get. File. Size the file number (not to be confused with the file number used in the Open command), and it returns the filesize of the open file, in two 3. You then pass these two variables to one of your functions, Long. Size, to get a single variable with the real file size. Next, you will do your new Openfile function. As mentioned, this function has the added benefit of returning the filesize when you open the file.
Also, there is no need to find a free file number because the function will return a unique Windows Handle for the file; you can use this to call the File Handle or the File number. VB6. Public Sub API_Open. File(By. Val File. Name As String, _. By. Ref File. Number As Long, _. By. Ref File. Size As Currency). Dim File. H As Long.
Dim Ret As Long. On Error Resume Next. File. H = Create. File(File. Name, GENERIC_READ Or GENERIC_WRITE, _.
FILE_SHARE_READ Or FILE_SHARE_WRITE, 0& , _. OPEN_ALLWAYS, 0, 0). If Err. Number > 0 Then. File. Number = - 1. File. Number = File. H. Ret = Set. File.
Pointer(File. H, 0, 0, FILE_BEGIN). API_File. Size File.
H, File. Size. On Error Go. To 0. Public Sub API_Open.
File(By. Val File. Name As String, _. By. Ref File. Number As UInteger, _. By. Ref File. Size As ULong). Dim File. H As UInteger.
Dim Ret As UInteger. On Error Resume Next. File. H = Create.
File(File. Name, GENERIC_READ Or GENERIC_WRITE, _. FILE_SHARE_READ Or FILE_SHARE_WRITE, 0, _. OPEN_ALLWAYS, 0, 0). If Err. Number > 0 Then.
File. Number = 0. File. Number = File. H. Ret = Set. File.
Pointer(File. H, 0, 0, FILE_BEGIN). API_File. Size(File. H, File. Size). On Error Go. To 0. Here, you enable error trapping for the Create.
File API because, if there is a problem opening a file the API Errors out, and you need to trap it and react to it. At the moment, you simply reply that the file open was unsuccessful, but you can expand the function to include codes for failure reasons. You then set the file position to zero so that your first read starts at the beginning of the file.
This is not vital, but I felt it is warranted for those "just- in- case" scenarios. Next, you call the API_File. Size function with the File Handle you got from the Create.
File API. When the function ends, you now have a File Handle for the requested file and the file size. On the next page, you look at reading and writing blocks of data to and from the file. Also, you find another added benefit of using API's—the ability to trim the filesize down.