Mirage Source http://www.miragesource.net/forums/ |
|
Updated: Sprite Preview http://www.miragesource.net/forums/viewtopic.php?f=201&t=1014 |
Page 1 of 46 |
Author: | James [ Mon Jan 01, 2007 6:42 pm ] |
Post subject: | Updated: Sprite Preview |
I want to columns of items since if I kept extending my current one it would be too long for a lot of PCs. How/where should I begin editing to make this a reality? |
Author: | Obsidian [ Mon Jan 01, 2007 6:54 pm ] |
Post subject: | |
make sure the editor stores an x and y, and make sure the blt recs don't just use pic_x for left... check out one of the sources that have it if you need an example. I think Konfuze had that. |
Author: | Robin [ Mon Jan 01, 2007 6:54 pm ] |
Post subject: | |
Errrrm,,,,,, ones of those lists which has different thingys,,,,, Ooooor add antoher list and have' 'if item>50 and <10e then add to second list foo'! ' |
Author: | James [ Tue Jan 02, 2007 2:17 am ] |
Post subject: | |
Fixed the itemset issue, now how about this. I had an old code from GSD that showed a preview of the sprite when you made it. I have since changed to PNG graphics and that code is no longer usable. I made a timer on frmNewChar and then made a timer which is set at an interval of 50 and so it calls a duplicate of the BltNPC sub used for the NPC editor to blit the sprite into a picbox. Below are the ocdes for the timer and the sub. If anyone could tell me why it isnt working, please help! Code: Public Sub NewCharBltSprite() With rec If frmNewChar.optMale.Value = True Then .top = Int(Class(frmNewChar.cmbClass.ListIndex).Sprite) * PIC_Y Else .top = Int(Class(frmNewChar.cmbClass.ListIndex).Sprite + 1) * PIC_Y End If .Bottom = .top + PIC_Y .Left = 3 * PIC_X .Right = .Left + PIC_X End With With rec_pos .top = 0 .Bottom = PIC_Y .Left = 0 .Right = PIC_X End With If DD_SpriteSurf Is Nothing Then Else DD_SpriteSurf.BltToDC frmNewChar.picpic.hDC, rec, rec_pos End If frmNewChar.picpic.Refresh End Sub and the timer Code: Private Sub timerSprite_Timer()
Call NewCharBltSprite End Sub I've discovered this is because InitDirectX and InitSurfaces hasn't been called yet, but I can't call them until after this done because it calls up frmMirage, is there any way to edit this so frmMirage doesn't appear until afterwards? New Update: Now with Dave it will show the very first sprite and second when u hit female, but it wont change the sprite, even when i move the Call NewCharBltSprite to the cmbClass_Click sub. |
Author: | James [ Tue Jan 02, 2007 4:35 am ] |
Post subject: | |
Okay, by calling those things before hadn it works, somewhat. It only shows Sprite 1 and 2 when I click female (Class Sprite + 1 = Female Sprite on the sprite sheet) but it wont change when everything else changes. here are the subs: Code: Private Sub cmbClass_Click() lblHP.Caption = STR(Class(cmbClass.ListIndex).HP) lblMP.Caption = STR(Class(cmbClass.ListIndex).MP) lblSP.Caption = STR(Class(cmbClass.ListIndex).SP) lblSTR.Caption = STR(Class(cmbClass.ListIndex).STR) lblDEF.Caption = STR(Class(cmbClass.ListIndex).DEF) lblSPEED.Caption = STR(Class(cmbClass.ListIndex).SPEED) lblMAGI.Caption = STR(Class(cmbClass.ListIndex).MAGI) Call picpic.Refresh Call NewCharBltSprite(cmbClass.ListIndex) End Sub Code: Private Sub cmbClass_Change() Call NewCharBltSprite(cmbClass.ListIndex) End Sub Code: Public Sub NewCharBltSprite(ByVal ListIndexSprite As Long)
With rec If frmNewChar.optMale.Value = True Then .top = Int(Class(ListIndexSprite).Sprite) * PIC_Y Else .top = Int(Class(ListIndexSprite).Sprite + 1) * PIC_Y End If .Bottom = .top + PIC_Y .Left = 3 * PIC_X .Right = .Left + PIC_X End With With rec_pos .top = 0 .Bottom = PIC_Y .Left = 0 .Right = PIC_X End With If DD_SpriteSurf Is Nothing Then Else DD_SpriteSurf.BltToDC frmNewChar.picpic.hDC, rec, rec_pos End If End Sub So, right now, it shows well, Sprite 0 technically, and when I click female, it does change, however when I change the cmbClass the stats change, but the sprite does not, and I am unsure why. |
Author: | James [ Tue Jan 02, 2007 6:29 am ] |
Post subject: | |
Error found. I = Idget. Sorry. |
Author: | wanai [ Sun Jan 23, 2022 9:39 am ] |
Post subject: | Re: Updated: Sprite Preview |
Kbit |
Author: | wanai [ Sun Jan 23, 2022 9:41 am ] |
Post subject: | Re: Updated: Sprite Preview |
163.4 |
Author: | wanai [ Sun Jan 23, 2022 9:42 am ] |
Post subject: | Re: Updated: Sprite Preview |
Bett |
Author: | wanai [ Sun Jan 23, 2022 9:43 am ] |
Post subject: | Re: Updated: Sprite Preview |
Bett |
Author: | wanai [ Sun Jan 23, 2022 9:44 am ] |
Post subject: | Re: Updated: Sprite Preview |
Cudd |
Author: | wanai [ Sun Jan 23, 2022 9:45 am ] |
Post subject: | Re: Updated: Sprite Preview |
Pict |
Author: | wanai [ Sun Jan 23, 2022 9:46 am ] |
Post subject: | Re: Updated: Sprite Preview |
Noth |
Author: | wanai [ Sun Jan 23, 2022 9:47 am ] |
Post subject: | Re: Updated: Sprite Preview |
Wend |
Author: | wanai [ Sun Jan 23, 2022 9:48 am ] |
Post subject: | Re: Updated: Sprite Preview |
Jere |
Author: | wanai [ Sun Jan 23, 2022 9:49 am ] |
Post subject: | Re: Updated: Sprite Preview |
John |
Author: | wanai [ Sun Jan 23, 2022 9:51 am ] |
Post subject: | Re: Updated: Sprite Preview |
Hits |
Author: | wanai [ Sun Jan 23, 2022 9:52 am ] |
Post subject: | Re: Updated: Sprite Preview |
Atom |
Author: | wanai [ Sun Jan 23, 2022 9:53 am ] |
Post subject: | Re: Updated: Sprite Preview |
Atla |
Author: | wanai [ Sun Jan 23, 2022 9:54 am ] |
Post subject: | Re: Updated: Sprite Preview |
Atla |
Author: | wanai [ Sun Jan 23, 2022 9:55 am ] |
Post subject: | Re: Updated: Sprite Preview |
Mark |
Author: | wanai [ Sun Jan 23, 2022 9:56 am ] |
Post subject: | Re: Updated: Sprite Preview |
Quat |
Author: | wanai [ Sun Jan 23, 2022 9:57 am ] |
Post subject: | Re: Updated: Sprite Preview |
XVII |
Author: | wanai [ Sun Jan 23, 2022 9:58 am ] |
Post subject: | Re: Updated: Sprite Preview |
Deko |
Page 1 of 46 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |