Post by hyperfighting on Jan 21, 2021 21:52:30 GMT
Hello Everyone!
I am excited to be here! I have a project I dust off every few years and try to chisel away at.
Big thanks to all the dev's who have been contributing to the scene!
As of writing this the compiler states:
"PC Engine Assembler (v 3.23-c266d57, 2018-07-07)"
I think I'm on Elmers most recent build.
Some quick observations based on the fork of HuC I am using.
EX: If you have a function 'func();' the compiler will not complain if you accidentally compile 'func;' without the brackets.
EX: If you have a function 'func(char a);' the compiler will not complain if you accidentally compile the function with more parameters than the ones you originally assigned to the function. -'func(a,b,c,d);'
Those are things that have snuck by me in the past and wreaked havoc on my program so I thought I would mention them.
I have a couple questions I'm hoping someone might be able to help me out with.
The first is in relation to something I must be doing wrong with the 'load_map' and initialization of the 'scroll' function.
I got my own promotion map loading in HuC!
**Edit I totally rewrote the post to properly describe my problem.
Say I have a map 256*672 to me that says there are 3 vertically placed - 256*224 screens in that map.
Mid Game I issue these calls...
My goal is to seamlessly jump from 1 - 16x14 tile screen to another. (Tiles are 16x16 in this case)
The function below works but I get terrible GFX glitch upon issuing the command below.
However if I have the same function minus the scroller and a 16 instead of a 14 my the transition to the second screen is flawless with no GFX glitches!
I have no clue why this works but it does.
Finally I am using this scrolling code to get to the bottom of my map 1 row of tiles at a time.
The 1st function above works perfectly with the scroll code but I get a really nasty GFX glitch on initialization of 'Load_Screen2()'
The 2nd function scrolls from the wrong start point but has No GFX glitch on initialization of 'Load_Screen2()'
I tried screwing around with the initialized value of map.vy as I know that the scroll function is using that value but try as I may the damn scroll is always offset improperly.
Does anyone know what I am doing wrong? I would so love to correct this.
On another note I have a question regarding text.
I can print to the screen using something like this:
I want to do something like you see below but I haven't the slightest clue how to output the same font but with two different colours on two separate lines.
Well that's it for now sorry to be a pain in the neck. Really hoping to figure these ones out.
I am excited to be here! I have a project I dust off every few years and try to chisel away at.
Big thanks to all the dev's who have been contributing to the scene!
As of writing this the compiler states:
"PC Engine Assembler (v 3.23-c266d57, 2018-07-07)"
I think I'm on Elmers most recent build.
Some quick observations based on the fork of HuC I am using.
EX: If you have a function 'func();' the compiler will not complain if you accidentally compile 'func;' without the brackets.
EX: If you have a function 'func(char a);' the compiler will not complain if you accidentally compile the function with more parameters than the ones you originally assigned to the function. -'func(a,b,c,d);'
Those are things that have snuck by me in the past and wreaked havoc on my program so I thought I would mention them.
I have a couple questions I'm hoping someone might be able to help me out with.
The first is in relation to something I must be doing wrong with the 'load_map' and initialization of the 'scroll' function.
I got my own promotion map loading in HuC!
**Edit I totally rewrote the post to properly describe my problem.
Say I have a map 256*672 to me that says there are 3 vertically placed - 256*224 screens in that map.
Mid Game I issue these calls...
My goal is to seamlessly jump from 1 - 16x14 tile screen to another. (Tiles are 16x16 in this case)
The function below works but I get terrible GFX glitch upon issuing the command below.
void Load_Screen2()
{
map.vx =0;
map.vy =224;
load_map(0,14,0,14,18,16);
scroll(0, 0, 224, 0, 223, 0xC0);
}
However if I have the same function minus the scroller and a 16 instead of a 14 my the transition to the second screen is flawless with no GFX glitches!
I have no clue why this works but it does.
void Load_Screen2()
{
map.vx =0;
map.vy =224;
load_map(0,16,0,14,18,16);
}
Finally I am using this scrolling code to get to the bottom of my map 1 row of tiles at a time.
void move_map(char whichway, char scrollSpeed)
{
if (whichway == 0) return;
else if (whichway == DIR_DOWN) map.vy+=scrollSpeed;
map.x = (map.vx >> 4);//Divide by 16 becasue we are using 16x16 Tiles
map.y = (map.vy >> 4);//Divide by 16 becasue we are using 16x16 Tiles
if (whichway == DIR_DOWN)
{
if ((map.lastx != map.x) || (map.lasty != map.y))
{
map.t3 = ((map.y+14) & 0xFF);
load_map(map.x,map.t3,map.x,map.t3,SCR_W,1);
}
}
scroll(0,map.vx,map.vy,0,223,0xC0);
map.lastx = map.x;
map.lasty = map.y;
}
The 1st function above works perfectly with the scroll code but I get a really nasty GFX glitch on initialization of 'Load_Screen2()'
The 2nd function scrolls from the wrong start point but has No GFX glitch on initialization of 'Load_Screen2()'
I tried screwing around with the initialized value of map.vy as I know that the scroll function is using that value but try as I may the damn scroll is always offset improperly.
Does anyone know what I am doing wrong? I would so love to correct this.
On another note I have a question regarding text.
I can print to the screen using something like this:
set_font_color(2, 13);
set_font_pal(0);
load_default_font();
put_string("HELLO WORLD", 4, 30);
I want to do something like you see below but I haven't the slightest clue how to output the same font but with two different colours on two separate lines.
This is Blue Text
This is Red Text
Well that's it for now sorry to be a pain in the neck. Really hoping to figure these ones out.