use LEVEL struct for LvlSwitch
This commit is contained in:
parent
d9a598b723
commit
31e5f5f541
19
psx.c
19
psx.c
@ -157,6 +157,9 @@ void LvlPtrSet(LEVEL * curLevel, LEVEL * level){
|
||||
|
||||
//~ FntPrint("%x %x", curLevel->meshes, level->meshes);
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
void LoadLevel(const char*const LevelName, u_long * LoadAddress){
|
||||
@ -168,6 +171,22 @@ void LoadLevel(const char*const LevelName, u_long * LoadAddress){
|
||||
cdsync = CdReadSync(0, 0);
|
||||
};
|
||||
|
||||
void SwitchLevel(const char*const LevelName, u_long * LoadAddress, LEVEL * curLevel, LEVEL * loadLevel ){
|
||||
|
||||
ScrRst();
|
||||
|
||||
LoadLevel( LevelName, LoadAddress );
|
||||
|
||||
LvlPtrSet( curLevel, loadLevel);
|
||||
|
||||
for (int k = 0; k < *curLevel->meshes_length ; k++){
|
||||
|
||||
LoadTexture(curLevel->meshes[k]->tim_data, curLevel->meshes[k]->tim);
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
void LoadTexture(u_long * tim, TIM_IMAGE * tparam){ // This part is from Lameguy64's tutorial series : lameguy64.net/svn/pstutorials/chapter1/3-textures.html login/pw: annoyingmous
|
||||
|
||||
OpenTIM(tim); // Open the tim binary data, feed it the address of the data in memory
|
||||
|
2
psx.h
2
psx.h
@ -26,4 +26,6 @@ void LvlPtrSet( LEVEL * curLevel, LEVEL * level );
|
||||
|
||||
void LoadLevel(const char*const LevelName, u_long * LoadAddress);
|
||||
|
||||
void SwitchLevel(const char*const LevelName, u_long * LoadAddress, LEVEL * curLevel, LEVEL * loadLevel);
|
||||
|
||||
void LoadTexture(u_long * tim, TIM_IMAGE * tparam);
|
||||
|
Loading…
Reference in New Issue
Block a user