Author Topic: (no subject)  (Read 2028 times)

AlienDude

  • Member
  • *
  • Posts: 605
    • View Profile
    • http://www.taralax.com
(no subject)
« on: December 02, 2005, 09:21:26 AM »
I did this lil proggie a few weeks ago, but have yet to get it to work. all it does not do is display the text that is inputted, here is the display method:
Code: [Select]
method display()
{
local(curtext$, "")
local(curline!, 0)
local(curttime!, 0)
local(curltime!, 0)
local(curred!, 255)
local(curgreen!, 255)
local(curblue!, 255)
local(curcenline!, 0)
local(next_t!, 0)
local(next_f!, 0)
local(next_s!, 0)
local(next_r!, 0)
local(next_g!, 0)
local(next_b!, 0)
local(next_c!, 0)
local(top!, 0)
local(left!, 0)


tcanvas!=createcanvas(windx!,windy!)
for(curline!=0; curline!<lines!; curline!++)
{
if(fontat[next_f!]! == curline!)
{
font(fonts[next_f!]$)
next_f!++
}

if(sizeat[next_s!]! == curline!)
{
fontsize(sizes[next_s!]!)
next_s!++
}

if(ttimeat[next_t!]! == curline!)
{
curttime!=ttimes[next_t!]!
next_t!++
}

if(ltimeat[next_l!]! == curline!)
{
curltime!=ltimes[next_l!]!
next_l!++
}

if(redat[next_r!]! == curline!)
{
curred!=reds[next_r!]!
next_r!++
}

if(greenat[next_g!]! == curline!)
{
curgreen!=greens[next_g!]!
next_g!++
}

if(blueat[next_b!]! == curline!)
{
curblue!=reds[next_b!]!
next_r!++
}

if(cenlineat[next_c!]! == curline!)
{
curcenline!=cenlines[next_c!]!
next_c!++
}

colorrgb(curred!, curgreen!, curblue!)
sl!=length(text[curline!]$)
if(curcenline!)
{
left!=castint((windx! / 2) - (gettextwidth(text[curline!]$) / 2))
}
font(curfont$)
fontsize(cursize!)
local(x!, 0)
for(x!=0; x!<=sl!; x!++)
{
curtext$ += charat(text[curline!]$, x!)
pixeltext(left!, top!, curtext$, tcanvas!)
drawcanvas(tcanvas!, canx!, cany!, windx!, windy!)
delay(curttime!)
}
delay(curltime!)
left! = 0
top! += gettextheight(text[curline!]$)
}
font(ftype[1]$)
fontsize(defsize!)
mwin("LINE COMPLETE")
}
}
I am thinking of taking out the canvas part, or eventually using my canvas handler class when it gets completed, or just have the cinetext class incorporated into it.
If i get this down i cna get the intro done, and some aspects of the menu and battle system.
btw i will also be making a version that only shows one line of text, so that you input write each line separately, instead of having it all show up in tandem. ANy help will obviously be greatly appreciated.
« Last Edit: December 31, 1969, 06:00:00 PM by AlienDude »
Quote
May your star always be good to you and may your travels be swift.
 
- Traveller Farewell
(adapted from the Necroscope series by Brian Lumley)

Taralax Studios BEING REBUILT GENOME BY GENOME! xorlak@mysticsoftware.net
« Last Edit: December 31, 1969, 06:00:00 PM by Xorlak »

AlienDude

  • Member
  • *
  • Posts: 605
    • View Profile
    • http://www.taralax.com
(no subject)
« Reply #4 on: December 06, 2005, 09:31:06 AM »
it changes on the first time all the time and changes the value of the var only if the cntition is met, and i changed it so that it changes in the if statement.  The other problem is that the temp var that the text goes into wasnt clearing after each line, i may change it so that is only stores the next character, that way the text doesnt get applied a bunch of times. Could it have to do with using for loops? ill send it tomorrow, i will try smth with it tonight. Thanks!!!
« Last Edit: December 31, 1969, 06:00:00 PM by AlienDude »
Quote
May your star always be good to you and may your travels be swift.
 
- Traveller Farewell
(adapted from the Necroscope series by Brian Lumley)

Taralax Studios BEING REBUILT GENOME BY GENOME! \n\t\t\t\t\t\t\t\t\t
<' + '/div>\n\t\t\t\t\t\t\t\t\t