change default TIunA export params

so it works by just replacing song.asm
This commit is contained in:
tildearrow 2025-03-15 04:09:59 -05:00
parent 7a544fc0e0
commit 93f3ff3500
3 changed files with 20 additions and 12 deletions

View file

@ -187,8 +187,8 @@ void DivExportTiuna::run() {
std::map<int,TiunaCmd> allCmds[2]; std::map<int,TiunaCmd> allCmds[2];
// config // config
String baseLabel=conf.getString("baseLabel","song"); String baseLabel=conf.getString("baseLabel","twin");
int firstBankSize=conf.getInt("firstBankSize",3072); int firstBankSize=conf.getInt("firstBankSize",1024);
int otherBankSize=conf.getInt("otherBankSize",4096-48); int otherBankSize=conf.getInt("otherBankSize",4096-48);
int tiaIdx=conf.getInt("sysToExport",-1); int tiaIdx=conf.getInt("sysToExport",-1);

View file

@ -280,8 +280,8 @@ void FurnaceGUI::drawExportROM(bool onWindow) {
switch (romTarget) { switch (romTarget) {
case DIV_ROM_TIUNA: { case DIV_ROM_TIUNA: {
String asmBaseLabel=romConfig.getString("baseLabel","song"); String asmBaseLabel=romConfig.getString("baseLabel","twin");
int firstBankSize=romConfig.getInt("firstBankSize",3072); int firstBankSize=romConfig.getInt("firstBankSize",1024);
int otherBankSize=romConfig.getInt("otherBankSize",4096-48); int otherBankSize=romConfig.getInt("otherBankSize",4096-48);
int sysToExport=romConfig.getInt("sysToExport",-1); int sysToExport=romConfig.getInt("sysToExport",-1);

View file

@ -213,6 +213,7 @@ struct FurnaceCVEnemy1: FurnaceCVObject {
unsigned char animFrame; unsigned char animFrame;
short nextTime, shootTime; short nextTime, shootTime;
unsigned char shootCooldown; unsigned char shootCooldown;
short orientCount;
void collision(FurnaceCVObject* other); void collision(FurnaceCVObject* other);
@ -227,7 +228,8 @@ struct FurnaceCVEnemy1: FurnaceCVObject {
animFrame(0), animFrame(0),
nextTime(64+(rand()%600)), nextTime(64+(rand()%600)),
shootTime(8), shootTime(8),
shootCooldown(0) { shootCooldown(0),
orientCount(0) {
type=CV_ENEMY; type=CV_ENEMY;
spriteDef[0]=0x200; spriteDef[0]=0x200;
spriteDef[1]=0x201; spriteDef[1]=0x201;
@ -1553,7 +1555,7 @@ void FurnaceCV::render(unsigned char joyIn) {
// S mod stat // S mod stat
if (speedTicks>0) { if (speedTicks>0) {
speedTicks--; speedTicks--;
if ((speedTicks<120 && speedTicks&2) || speedTicks&16) { if ((speedTicks<120 && speedTicks&2) || (speedTicks>=120 && speedTicks&16)) {
tile1[24][36]=0x41e; tile1[24][36]=0x41e;
tile1[24][37]=0x41f; tile1[24][37]=0x41f;
tile1[25][36]=0x43e; tile1[25][36]=0x43e;
@ -2322,9 +2324,16 @@ void FurnaceCVEnemy1::collision(FurnaceCVObject* other) {
} }
} else if (other->type==CV_ENEMY || other->type==CV_MINE) { } else if (other->type==CV_ENEMY || other->type==CV_MINE) {
// reorient // reorient
orientCount+=2;
if (orientCount>6) {
// stuck...
stopped=true;
cv->stopSoundEffect(SE_TANKMOVE);
} else {
orient=(orient+2)&3; orient=(orient+2)&3;
} }
} }
}
void FurnaceCVEnemy1::tick() { void FurnaceCVEnemy1::tick() {
if (!stopped) { if (!stopped) {
@ -2345,6 +2354,8 @@ void FurnaceCVEnemy1::tick() {
animFrame+=0x15; animFrame+=0x15;
} }
if (--orientCount<=0) orientCount=0;
if (--nextTime==0) { if (--nextTime==0) {
nextTime=64+(rand()%600); nextTime=64+(rand()%600);
@ -2402,11 +2413,8 @@ void FurnaceCVEnemy1::tick() {
} }
if (HITS_BORDER) { if (HITS_BORDER) {
if (x<0) orient=0; orient=(orient+2)&3;
if (x>=cv->stageWidthPx-16) orient=2;
if (y<0) orient=3;
if (y>=cv->stageHeightPx-16) orient=1;
cv->soundEffect(SE_TANKMOVE);
CONFINE_TO_BORDER; CONFINE_TO_BORDER;
} }