Add LoadLevelCd func
This commit is contained in:
parent
179c272b60
commit
a77d06494f
@ -40,13 +40,13 @@
|
||||
|
||||
#define OT2LEN 8
|
||||
|
||||
#define OTLEN 256
|
||||
#define OTLEN 768
|
||||
|
||||
#define PRIMBUFFLEN 4096 * sizeof(POLY_GT4) // Maximum number of POLY_GT3 primitives
|
||||
|
||||
// Fog
|
||||
|
||||
#define FOG_NEAR 1200
|
||||
#define FOG_NEAR 1300
|
||||
|
||||
#define FOG_FAR 1600
|
||||
|
||||
|
26
main.c
26
main.c
@ -30,14 +30,18 @@
|
||||
#include "graphics.h"
|
||||
#include "space.h"
|
||||
|
||||
#define USECD
|
||||
//~ #define USECD
|
||||
|
||||
// START OVERLAY
|
||||
|
||||
extern u_long load_all_overlays_here;
|
||||
|
||||
extern u_long __lvl0_end;
|
||||
|
||||
extern u_long __lvl1_end;
|
||||
|
||||
u_long overlaySize = 0;
|
||||
|
||||
//~ #define LLEVEL 0
|
||||
|
||||
//#define USE_POINTER
|
||||
@ -192,10 +196,14 @@ int main() {
|
||||
|
||||
overlayFile = "\\level0.bin;1";
|
||||
|
||||
overlaySize = __lvl0_end;
|
||||
|
||||
} else if ( level == 1) {
|
||||
|
||||
overlayFile = "\\level1.bin;1";
|
||||
|
||||
overlaySize = __lvl1_end;
|
||||
|
||||
}
|
||||
|
||||
// Load overlay
|
||||
@ -204,7 +212,7 @@ int main() {
|
||||
|
||||
CdInit();
|
||||
|
||||
LoadLevel(overlayFile, &load_all_overlays_here);
|
||||
LoadLevelCD(overlayFile, &load_all_overlays_here);
|
||||
|
||||
#endif
|
||||
|
||||
@ -333,12 +341,16 @@ int main() {
|
||||
|
||||
overlayFile = "\\level0.bin;1";
|
||||
|
||||
overlaySize = __lvl0_end;
|
||||
|
||||
break;
|
||||
|
||||
case 1:
|
||||
|
||||
overlayFile = "\\level1.bin;1";
|
||||
|
||||
|
||||
overlaySize = __lvl1_end;
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -349,7 +361,13 @@ int main() {
|
||||
|
||||
}
|
||||
|
||||
#ifdef USECD
|
||||
|
||||
SwitchLevel( overlayFile, &load_all_overlays_here, &curLvl, &level0);
|
||||
|
||||
#endif
|
||||
|
||||
printf("%p:%s", &load_all_overlays_here, overlayFile);
|
||||
|
||||
levelHasChanged = 0;
|
||||
|
||||
@ -1180,7 +1198,7 @@ void callback() {
|
||||
lgtang.vz += 32;
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ( PADR & PadUp && !timer ){
|
||||
|
||||
if (curLvl.actorPtr->isPrism){
|
||||
|
4
psx.c
4
psx.c
@ -174,7 +174,7 @@ void LvlPtrSet(LEVEL * curLevel, LEVEL * level){
|
||||
|
||||
};
|
||||
|
||||
int LoadLevel(const char*const LevelName, u_long * LoadAddress){
|
||||
int LoadLevelCD(const char*const LevelName, u_long * LoadAddress){
|
||||
|
||||
int cdread = 0, cdsync = 1;
|
||||
|
||||
@ -191,7 +191,7 @@ void SwitchLevel(const char*const LevelName, u_long * LoadAddress, LEVEL * curL
|
||||
|
||||
ScrRst();
|
||||
|
||||
LoadLevel( LevelName, LoadAddress );
|
||||
LoadLevelCD( LevelName, LoadAddress );
|
||||
|
||||
LvlPtrSet( curLevel, loadLevel);
|
||||
|
||||
|
2
psx.h
2
psx.h
@ -24,7 +24,7 @@ void display(DISPENV * disp, DRAWENV * draw, u_long * otdisc, char * primbuff, c
|
||||
|
||||
void LvlPtrSet( LEVEL * curLevel, LEVEL * level );
|
||||
|
||||
int LoadLevel(const char*const LevelName, u_long * LoadAddress);
|
||||
int LoadLevelCD(const char*const LevelName, u_long * LoadAddress);
|
||||
|
||||
void SwitchLevel(const char*const LevelName, u_long * LoadAddress, LEVEL * curLevel, LEVEL * loadLevel);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user