Unofficial Llibplanar 0.9

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
User avatar
ifcaro
Posts: 23
Joined: Sun Oct 19, 2008 4:11 am

Unofficial Llibplanar 0.9

Post by ifcaro »

Unofficial Llibplanar 0.9
Changes from the original version:

* Llib2D.c

- Added resize resolution PAL to NTSC

* Llib2DText.c

- Added resize resolution PAL to NTSC

- Added characters ñ Ñ and ¿

* Llib3D.c

- Added camera movement (position x, y, z, rotation x, y, z, pointing camera x, y, z)

- Added transparent objects

* Llibgs.c

- Added resize resolution PAL to NTSC

- Added the functions drawBoxLined() and drawBoxLined2()

* LlibTex.c

- Added the functions GetTextureDir(), SetTextureDir() and imageFree() Experimental!.
These functions are dangerous because they change the pointer of textures
no matter who is in that memory. (Used in the game "el boli" for
remove the last picture loaded without using the function textureFixDir()).

- Added imageLoadRawC() and imageLoadIIFC() functions to load an image in RAW/IIF format from memory.

* Load_IIF.c

- Added the functions IIF_vOpenFile(), IIF_vCloseFile(), IIF_vcountFrames(), IIF_vreadClut()
IIF_vreadImage() to upload files from the memory.

* LoadFile.c

- Added findMediaMode function () that automatically guesses if the program is running
from HOST, MC0, MC1, MASS or CDROM.

- Bars / or \ are changed automatically according to the accessed media.

- Added the functions vopenFile(), vcloseFile(), vreadFile(), vreadFileBlock(), vseekFile()
to read files from memory.

* Math.c

- Added the functions gradosaradianes() and radianesagrados().

NOTES:

In this version should not be used objectReset() in the program as it is called internally from objectTranslate() and objectRotate () functions. Also before gfxRender() must be added a camRender().
http://ps2dev.ifcaro.net/programas,11.htm
cosmito
Posts: 307
Joined: Sun Mar 04, 2007 4:26 am
Location: Portugal
Contact:

Post by cosmito »

Hello ifcaro,

Thanks for your work. I already knew Llibplanar from my first development experiments on the PS2 and it seems you added some nice features.

However, the sources will not compile under a regular ps2sdk installation due some the makefile issues. The changes I did were simple and I thought it would be nice to post them here, for beginners mainly :

(Attention beginners : Don't copy-paste this. Instead edit your files, since tabs are used for makefiles as separators which are not reproducible by copy-paste operations)

lalib-0.1s2\Makefile.pref :

Code: Select all

PS2DEV_Dir = $(PS2DEV)

#SHELL         = $(PS2DEV_Dir)/bin/sh.exe
#PS2DEV        = $(PS2DEV_Dir)/bin
PS2SDK        = $(PS2DEV_Dir)/ps2sdk
LALIB_DIR     = $(PS2DEV_Dir)/lalib-0.1s2
TOOLCHAIN_DIR = $(PS2DEV_Dir)/ee/lib/gcc-lib/ee/3.2.2

EE_PREFIX  = ee-
EE_CC      = $(EE_PREFIX)gcc
EE_AS      = $(EE_PREFIX)gcc
EE_LD      = $(EE_PREFIX)ld
EE_AR      = $(EE_PREFIX)ar
DVPASM     = $(PS2DEV)/dvp/bin/dvp-as
EE_OBJCOPY = $(EE_PREFIX)objcopy
EE_STRIP   = $(EE_PREFIX)strip
lalib-0.1s2\Makefile.global

Code: Select all

EE_INCS =  \
	-I$(TOOLCHAIN_DIR)/include       \
	-I$(PS2SDK)/ee/include           \
	-I$(PS2SDK)/common/include       \
	-I$(LALIB_DIR)/ee/include        \
	-I$(LALIB_DIR)/ee/samples/common 
    
        
EE_LIB_DIRS =  \
	-L$(TOOLCHAIN_DIR)      \
	-L$(PS2SDK)/ee/lib      \
	-L$(LALIB_DIR)/ee/lib   \
	-L$(PS2DEV)/ee/lib/gcc-lib/ee/3.2.2


EE_CFLAGS = -D_EE -fshort-double -O2 -G0 -c -Wall  $(EE_INCS)

DVPASMFLAGS = -g
(the remaining of the file is OK)
LlibPlanar\Makefile.pref :

Code: Select all

PS2DEV_Dir = $(PS2DEV)

#SHELL         = $(PS2DEV_Dir)/bin/sh.exe
#PS2DEV        = $(PS2DEV_Dir)/bin
PS2SDK        = $(PS2DEV_Dir)/ps2sdk
LALIB_DIR     = $(PS2DEV_Dir)/lalib-0.1s2
TOOLCHAIN_DIR = $(PS2DEV_Dir)/ee/lib/gcc-lib/ee/3.2.2
PLANAR_DIR = $(PS2DEV_Dir)/LlibPlanar

EE_PREFIX  = ee-
EE_CC      = $(EE_PREFIX)gcc
EE_AS      = $(EE_PREFIX)gcc
EE_LD      = $(EE_PREFIX)ld
EE_AR      = $(EE_PREFIX)ar
DVPASM     = $(PS2DEV)/dvp/bin/dvp-as
EE_OBJCOPY = $(EE_PREFIX)objcopy
EE_STRIP   = $(EE_PREFIX)strip
Also, it's expected to have the LlibPlanar and lalib-0.1s2 source folders placed at your ps2dev source folder.

Now it should compile.
User avatar
ifcaro
Posts: 23
Joined: Sun Oct 19, 2008 4:11 am

Post by ifcaro »

Thanks. I will edit it in the version 0.91 together with the patch of the function objectRotate()
Post Reply