• Welcome to Valhalla Legends Archive.
 
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 - Mr. Neo

#1
General Programming / Rotating an Image
September 13, 2005, 09:37 PM
I am working on rotating some images for a simple little game.  Currently, I have working code that will rotate an image 90, 180, or 270 degrees.  When I use this same code to rotate an image, say 45 degrees, the image gets distorted and cut off.  Example:


For the rotation, I'm using the formulas:
DestinationX = Cos(Degrees) * (OriginalX - OriginX) - Sin(Degrees) * (OriginalY - OriginY)
DestinationY = Sin(Degrees) * (OriginalX - OriginX) + Cos(Degrees) * (OriginalY - OriginY)

I just loop through every pixel in the original image and redraw it on a new image.  My code for this is:

  For i=-1 To Image.Width
    For n=-1 To Image.Height
      pnt.X = i
      pnt.Y = n
     
      rpnt = RotatePoint(pnt,originpnt,Amount)
     
      If rpnt.X > maxx Then
        maxx = rpnt.X
      End if
     
      If rpnt.Y > maxy Then
        maxy = rpnt.Y
      End If
     
      pict.RGBSurface.Pixel(rpnt.X,rpnt.Y) = Image.RGBSurface.Pixel(i,n)
     
    Next
  Next
 
  final = NewPicture(maxx,maxy,32)
  final.Graphics.DrawPicture pict,0,0


Image is holding the original picture, and pict is holding the rotated image as it is being assembled.  This is in REALbasic.

If there is a better algorithm for rotating pictures, I'd be extremely interested in knowing it.  Any insight into this would be greatly appreciated.
#2
No source either.  To find out the functions you'd need to utilize, I'd recommend you pick yourself up a type library viewer.  But, if your too lazy to do that, then look below for a complete listing of members in the OCX.

TypeInfos:
BNLSLogon

Members:
Event BNETConnected
Event BNETConnecting
Event BNETDisconnected
Event BNETError (Number As Integer, Description As String)
Event BNLSConnected
Event BNLSConnecting
Event BNLSDisconnected
Event BNSLError (Number As String, Description As String)
Event Broadcast (Message As String)
Event ChangePasswordProofResult (Result As Boolean, Message As String)
Event ChangePasswordResult (Result As Boolean, Message As String)
Event CheckRevisionResult (Result As Boolean, ErrorNumber As String, ErrorMessage As String)
Event CreateAccountResult (Result As Boolean, Message As String)
Event FlagsUpdate (Username As String, Ping As Long, flags As Long, Message As String, statsString

As String)
Event HandlePackets (Data As String)
Event JoinedChannel (Channel As String, flags As Long)
Event LoggedOn (UserName As String, Message As String, statsString As String)
Event PasswordHashResult (Result As Boolean, Message As String)
Event PasswordProof (Result As Boolean, Message As String)
Event ReceivedChannels (ChannelList As String)
Event ServerError (Message As String)
Event ServerInfo (Message As String)
Event UserEmote (Username As String, flags As Long, Message As String)
Event UserInChannel (Username As String, Ping As Long, flags As Long, Product As String, Message

As String, statstring As String)
Event UserJoined (Username As String, Ping As Long, flags As Long, Product As String, Message As

String, statstring As String)
Event UserLeave (Username As String, Ping As Long, flags As Long)
Event UserTalks (Username As String, Ping As Long, flags As Long, Message As String)
Event WhisperFrom (Username As String, flags As Long, Message As String)
Event WhisperTo (Username As String, Message As String)

Property CDKey As String
Property CDKey2 As String
Property CDKeyOwner As String
Property ChangePassword As Boolean
Property HomeChannel As String
Property NewPassword As String
Property Password As String
Property Product As String
Property Server As String
Property Use0msPing As Boolean
Property UsePlug As Boolean
Property Username As String

Sub Connect
Sub ConstructPacket (DataType As String, Data As String)
Sub Disconnect
Sub Send (Data As String)
Sub SendConstructedPacket (PacketID As Byte)
Sub strcpy (Source As String, ByVal nText As String)

#3
Quote from: Blaze on August 05, 2005, 01:44 PM
I remember someone releasing a csb-type ocx that does wc3 already..

I just searched and found it http://forum.valhallalegends.com/phpbbs/index.php?topic=8185.0 but its no longer on the site.  Ohh well.

I've got a copy of this OCX if anyone is interested in it.  It's just the OCX, no documentation or anything but it seems like it would be pretty self-explanatory.  If you want it, let me know and I can email it to your or something.
#4
Well at least it sounds somewhat normal.  It's been ~4 years since a format, so that is a definate possibility at this point. 
#5
General Discussion / Strange Internet Issue
July 20, 2005, 12:41 PM
On my computer, there is a really strange thing that happens frequently.  I have cable internet and am running Windows XP with SP2 installed.  About once or twice an hour (sometimes every few minutes), the default gateway on the connection just drops.  By drops, I mean it disappears.  When this happens, nothing internet related works and is only solved by doing a release-renew.

I have no problem with this happening when using Fedora.  This has been happening for the past few years, but recently it has gotten much worse.  Any ideas as to what is causing this issue, or even steps to remedy it?
#6
In XML-RPC, how does one go about handling an empty string?  The official spec doesn't say anything about it.  From what I've seen in several implementations of XML-RPC, the clients are only parsing for <string></string> as an empty element.  I know in XML you could do <string/>.  Would this be legal in XML-RPC?

An example would be:
<member><name>errors</name>
<value><string/></value></member>

Is this legal?  Or should it read:
<member><name>errors</name>
<value><string></string></value></member>

Any input on the issue would be great.  Also, any links to some sort of spec on how to handle an empty string would be appreciated.

Best,
#7
Quote
Name: Robert Simon
License Key: 4AQNHAF6-XYHSBX2C-HV3CYGNA-AQCQ9L54-RB550CSFUSA-WIN

Another key that I got from this offer, if anyone needs it.
#8
http://highspeed.realsoftware.com/REALbasic555/REALbasicSetup.exe

Quote from: Joex86] link=topic=11194.msg111011#msg111011 date=1115176870]
Did anyone grab this? I'd apreciate seeing someone upload the PC EXE.
#10
Hmm, how strange.  I'm a bit down the road from you and we had no snow last night.
#11
Go into the BIOS and set the boot device to be your cd drive.   Right after you turn on your computer it'll say something about "Press <KEY> to enter BIOS."  Just press that key and change the boot order.
#12
Quote from: Snake on April 06, 2005, 09:53 AM
This is bullshit, you actually have to have a valid VB key to use this for more then 10 days.

Bullshit.

Do you really?  I can't reproduce this behavior of needing a valid Visual Basic key.  In fact, it never once asked me for a Visual Basic key at all.  You just fill out the form, and 5 minutes later your key is in your inbox. 

The only key that I know of that lasts for only 10 days would be the demo version.  As long as you use that form, and download the real application, and not the demo application, you should be fine.

EDIT:
From now through April 15, 2005, Visual Basic users can get REALbasic 5.5 for Windows Standard Edition...
Is that the line that you are assuming says it works for only 10 days?  The offer itself ends on April 15, it has nothing to do with whether or not your key will work past that date.
#13
General Programming / Free REALbasic Key Offer
April 04, 2005, 09:12 PM
If your interested in getting a free REALbasic Windows Edition key, go ahead and visit this site.  This offer is technically valid only for owners of Visual Basic 6, but anybody can get a copy.  REALbasic is very similar to Visual Basic, only that it can compile on Windows, Mac, and Linux.  Also, compiled REALbasic applications have the runtime library included in the executable so that the end-user does not need to have the library preinstalled.

I have been using REALbasic for about a year, and can highly recommend it for anyone looking for a quick, easy to learn/use BASIC language.  Below is a copy of the message that I got after getting my key.  This new version (5.5.5) is much better than past versions and I feel that it surpasses Visual Basic in usability. 

QuoteHi ,

Welcome to the REALbasic community. I want to personally thank you for
requesting your free REALbasic key and for considering REALbasic as your
alternative to Visual Basic.

Since we started giving away REALbasic keys to Visual Basic users two weeks
ago, more than 10,000 new Windows developers like you have joined the
REALbasic community. Unlike Visual Basic, REALbasic is fully supported and
we will continue to improve it constantly based on feedback from you, our
new users.

We are so excited by the positive response from the Visual Basic user
community that we have decided to extend our offer of free REALbasic
license keys through April 15, 2005. And we would like to ask for your help
in getting the word out to more Visual Basic users who might not yet know
about REALbasic.

To reward you for your time and effort, we are turning this into a contest.
We have generated a unique URL for you to share with your friends and
colleagues who might be interested in REALbasic. Every time someone
requests a free REALbasic license key via this URL, you will receive
credit. After the offer ends on Friday, April 15, we will count up the
referrals and award a prize to the top 100 people who bring us the most new
users.

The prize for the top 100 people is an upgrade to REALbasic Professional
Edition for Windows and 12-months of software maintenance (collectively
worth more than $500).

Your personalized URL to share with your friends and colleagues is:
http://www.realbasic.com/vb6/index.php

Your friends and colleagues must use this URL for you to get credit. And
feel free to encourage them to pass it along to more people. (By the way,
we will verify that each referral is associated with a valid and unique
email address before picking the winners.)

Thank you again for trying REALbasic and for helping us spread the word. I
welcome your feedback and comments about REALbasic and I assure you that
REAL Software will work hard to earn and keep your business for years to
come.

Best regards,

Geoff Perlman
Founder and CEO
REAL Software, Inc.
#15
On topic with Gmail, does anybody know a speedy way to import ~100,000 messages into Gmail from Thunderbird?  Right now I'm using the Google Mail Loader by Mark Lyon but its horribly slow.  At the rate that it is going, I should have everything imported in more than two days time.  Are there any faster methods or is this as good as it gets?