Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - bx83

#1
BTW...
Why do we have to launch the GUI of CMake? I didn't even write in any info on it's main screen; went off and compiled fully without a hitch. :/
#2
It's a compiled version of the Mac (3.5.0) engine; not really a wrapper. Well, in the sense it wraps a system-agnostic version of the game (say the windows exe file) as a Mac .app?...
#3
emabolo, TheVolumeRemote should generate a new wrapper for 3.5.1, or produce a tutorial on how to compile the 3.5.1 code into a Mac engine so I no longer have to bother him by proxy, HINT HINT HINT ;P
#4
Snarky, okay no worries. I'll keep in touch, atm just hacking-away all last known errors before release.
#5
I have a problem that when I set a bubble with SayAtBubble(), it's x/y coords are totally static. If the speech bubble is placed directly above the head of a character, and it turns out it's 5 lines long, it will continue to go down the screen and obscure the character's head.

How would I alter things? eg:

Code: ags
SayAtBubble(talk_x, talk_y-(bubbleSprite.GetNumberOfLines*8), "&777 line");   //will push the speech bubble up by number of lines used in speechbubble * 8 pixels for each


Basically, I am wondering how I would alter SayAtBubble so that the bubble's tail, *NOT* the upper-left corner, is used to position it; though obviously this is very difficult, I just want to know where I would get the variable controlling number of text lines so I can do it sort-of automatically.
#6
Thank you :)
#7
Does Remote or anyone know how to change the icons from standard AGS by doing something *other* than re-compiling the MacOS engine from scratch?
#8
I renamed it LoCI.app, works fine.
#9
TheVolumeRemote, could you produce a version of the wrapper for AGS 3.5.0.31 / 3.5.0-p9?

(my game is p9, currently seems to work with p7, but testing might produce a crash)
#10
....Aaaand I'm a moron. It was replacing the GUI not attaching to it. I created a new one with ZOrder=999, and it worked :)

Now - is there a way to get rid of the tail?
#11
Okay, ignore that, made no sense.

I've made some progress...

Code: ags
void SayAtBubble(this Character*, int x, int y, String message, GUI* bubbleGui)
{
  if(message == null) return;
  if(!game.bgspeech_stay_on_display)
    _stopAllBackgroundBubbles();
  if((Speech.VoiceMode == eSpeechVoiceOnly && hasVoiceClip(message)) || message == "...") {
    this.SB_sayImpl(message);
  } else {
    DynamicSprite* bubbleSprite = this.renderBubble32(message, true);

.....
		} else {		
			x = this.x - GetViewportX() - bubbleSprite.Width/2;					//BLR
		}
		
		x = _clampInt(x, 0, System.ViewportWidth - bubbleSprite.Width);   // /2);
		
    if (DescribeItemInv) {
      cJulius.realSayAtBubble(1, 1, message, gInventory, null);
    } else {
      this.realSayAtBubble(x, y, message, bubbleGui, null);
    }
  }
}


DescribeItemInv is a switch I set up to say 'the inventory is showing'. Don't ask me why, I'll clean it up later.

Anyway - it now:
1. Instantly removes the gInventory GUI
2. Does the speech bubble
3. Prevents you from ever bringing the gInventory GUI up again

:/


ps. I have BTN_SB as a blank element in the gInventory GUI as a button. Should I leave it in?
#12
fir creating a bubble - you mean initialised with SpeechBubble *gInvBubble = SpeechBubble.Create(....  or..?
#13
To myself, it's good to have a plan, but I don't think I could implement this in 6months. Basically all I'll trying to do is display a speech bubble at x=20, y=30, and have it appear above the Inventory GUI (which has a solid background) for all speech connected to i[something]_look() functions.

But anyway - when do you think this feature will be coming out re ZOrder? Is in the next version or 5 months of bug-fixing away? Just trying to get an idea.
#14
How can I display a Speechbubble so that it is on top of all GUIs? ie. Make it's ZOrder=1000 -- despite the fact it has no ZOrder and no obvious way of doing this... :/
#15
Solved it. Had the problem in the code, for SayAtBubble().

Had
x = _clampInt(x, 0, System.ViewportWidth - bubbleSprite.Width/2);
instead of
x = _clampInt(x, 0, System.ViewportWidth - bubbleSprite.Width);

Not that it matters, but all good now :)
#16
I've just found out this only happens to Julius (main character), as he has a separate talking function (to accout for Z-axis alteration). I "reverse engineered" (ie hacked together unknowingly) the speech bubble function, which looks like this:

Code: ags
function cJulius_spk(String msg)
{
  // Calculate text dimensions
  int textWidth = -1;

  int w = System.ViewportWidth * 2/3;
  if(cJulius.x - GetViewportX() <= System.ViewportWidth/4 || cJulius.x - GetViewportX() >= System.ViewportWidth * 3/4) {
    w -= System.ViewportWidth/5;
  }
  textWidth=w;

  if(textWidth < (System.ViewportWidth - 40)) {
    textWidth=textWidth;
  } else {
    textWidth=System.ViewportWidth - 40;
  }
  
  int textHeight = GetTextHeight(msg, 1, textWidth);
  
  int cut = textWidth;
  int height = textHeight;
  while(cut>1) {
    cut = (cut+1) >> 1; // Subtract half as much as we tried last time, rounding up
    height = GetTextHeight(msg, 1, textWidth - cut);
    if(height == textHeight) {
      textWidth -= cut;
    }
  }
  height = GetTextHeight(msg, 1, textWidth-1);
  if(height == textHeight) {
    textWidth=textWidth-1;
  } else {
    textWidth=textWidth;
  }

  int totalWidth = textWidth + 20 + 20;
  int bubbleHeight = textHeight + 10 + 10;
  int totalHeight;
  totalHeight = bubbleHeight + 9;

  SpeechBubbleHeight_blr=totalHeight;

  int headHeight=355;     //constant
  int spaceAboveHead=8;  //constant

  float h=IntToFloat( SpeechBubbleHeight_blr ); //constant
  float f=( (IntToFloat(headHeight+spaceAboveHead)/100.0)*IntToFloat(cJulius.Scaling) ) + h;
 
  cJulius.SayAtBubble(cJulius.x, cJulius.y - FloatToInt(f), msg);
}


Would you be able to help me insert the viewport code? I can work it out but it'll take a long time.
#17
Snarky, I have two things and wondering if they’re possible:
1. Turn off speechbubble easily (so they never display) by setting one option.
2. Not allow a speech bubble to be written off the right edge of the screen (at the moment it must start at x=0, but if a character is standing too far to the right, they’re speech bubble may be cut off). Is there a way to make their right edge or both edges impossible to be drawn off screen?
#18
Solved.
#19
I don't know... :/
I'll test it.
SMF spam blocked by CleanTalk