Oankali's GP32 run-time library version 2.1a

In this section you can find the sources of my GP32 C Libraries. Most of my projects use one or more of them.
All my projects and libraries are based on the GP32 official SDK and actually are in pure C, no ARM assembler at the moment.

The complete structure I use for my sources is as follows.

src
   gp32
      include
         fonts
      projectn
      ...
    Win32Lib

In the include folder are located all my general purpose libraries like the OKF Font Engine or the FileSelector.
In the
fonts folder are located the C versions of the OKF fonts I use in my projects.
In the
projectn folders are located all the files related to a specific project.
In the
Win32Lib folder are located the files of the Gamepark SDK for Windows.

The C Libraries section is exclusively about the C source files located in the include folder. To find the sources of my projects, go to the Projects section to see if the sources are available. To setup the Gamepark SDK for Windows, go to the Docs section.

GP32 C Libraries
    Clock
    Compatibility
    Compatibility_cpp
    Global
    Graphics16
    FileSelector
    Folder
    List
    Okf
    Riff


Download OKLibs_v2.1a.zip that contains all libraries listed below.
Download OKFonts_v1.zip that contains all OKF fonts needed to compile my projects.
 
     
     
  CLOCK.H

In the Clock library are defined all the constants I use when setting up the cpu clock speed. The library is based on ThunderZ work and some constants comes from Mr. Mirko SDK.
The lib also defines a global variable that you can use to get the number of ticks per seconds for the current cpu speed.  
I'm not really satisfied with this lib as some cpu speeds can result in bad LCD refresh rates, and strange PCM frequencies. If someone can help me fixing it, I would be very grateful.


Dependencies: none
 
     
     
  COMPATIBILITY.C

This is not really a library, it's more a helper module to patch some Gamepark SDK functions when programming under VC++ 6.
It can also be used to simulate functions of other precompiled libraries. As an example, I have included dummy functions that allows you to compile a program that uses CHN libmodplay library, with VC++ 6. Of course, the library doesn't work, but at least you can still code the other parts of your program.


Dependencies: depends on functions you are patching
 
     
     
  COMPATIBILITY_CPP.CPP

As Compatibility.c this is not really a library, it's another helper module to patch VC6++. It overrides new/delete operators to make use of gm_malloc() and gm_free() when needed (I hope!).
I cannot make any guaranty of the accuracy of this module.


Dependencies: none
 
     
     
  FILESELECTOR.H

With this library you can implement very quickly and simply a file selector in your program.
You can use a default file selector, or you can customize it completely setting the members of the main structure of the library. You can even set the fonts to use via OKF fonts.
The library is based on my
Folder C library, meaning that you can use the file selector to filter the files by extension or by name.

In the Projects section you can find File Selector Tester, an example of the use of the library.


Dependencies: GLOBAL.H, GRAPHICS16.H, LIST.H, OKF.H, FOLDER.H
 
     
     
  FOLDER.H

This library retrieves a C structure containing a linked list of files and/or folders from your SMC card. The files/folders can be filtered by name/extension in the same way as the DOS dir command. Depending on the options used, the library can be used as a base to explore folder structure of the SMC card. A good example of this is the FileSelector library.


Dependencies: LIST.H
Documentation
 
     
     
  GLOBAL.H

The Global library is needed almost in all my projects. It contains the declaration of the 2 surfaces I always use, a function to init the graphic mode and other general purpose functions.


Dependencies: none
 
     
     
  GRAPHICS16.H

Except in some very small test programs where I use 8 bit graphic mode, I usually use 16 bit graphic mode. This library contains some useful functions to use in 16 bits graphic mode.


Dependencies: GLOBAL.H
 
     
     
  LIST.H

The List library is specially suited to maintain a linked list of dynamically allocated items. It is used in other libraries like Folder or Okf.


Dependencies: none
Documentation
 
     
     
  OKF.H

The Okf library is the most important of my GP32 C libraries. See OKF Fonts Project to know more about it.


Dependencies: GLOBAL.H, LIST.H
Documentation
 
     
     
  RIFF.H

With this library you can manage any RIFF file, as WAV, AVI, etc...
Be aware that the Riff library will not interpret the data in RIFF files, it's purpose is to provide an easy interface to access or write RIFF data chunks. Also note that it should be smart enough to cancel and upgrade chunks if sizes have increased, allowing you, for example, to upgrade an option file with the same name.
I use this structure in my own games to save options and record tables.


Dependencies: none
 
     

______________________________
Copyright (c) 2005 Guillem Reinoso