Mirage Source
Genders - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17)
+---- Thread: Genders (/showthread.php?tid=375)



- William - 20-10-2006

1. Make sure there actually is a value that the getvar command is trying to grab.

2. Does FileName has a dir?

3. Male/Female aint in MSE right? That means you might have done something wrong with this line:
Code:
Class(i).MaleSprite



- Obsidian - 21-10-2006

try to use binary instead of INIs, it'll get rid of the majority of the rte13's... but the problem is that either the INI file is incorrect like will said (e.g., the file isn't in the correct today, the path is incorrect to the file, or the header is incorrect, etc.)


- DarkX - 23-10-2006

Hey guys, I finally got around to installing this myself, and it doesn't work with 32*64, any clues on how to fix this?

edit---
By the way when I say it doesn't work,(as well as 32*64) is that neither of them make the second class right. If you pick female it blits you as a 32*32, and it doesn't blit the second sprite, it just blits the feet section of the females/second classes.


- Dark Echo - 24-10-2006

DarkX, there must be something wrong with your 32x64 code.. Check your bltplayer sub.. When it blts the female side, it saids that the female sprite is 32pixels understand the male sprite.. Just change that to 64..


- Nexarcon - 24-10-2006

Or you may be selecting the wrong sprite number Wink


- DarkX - 26-10-2006

Ok, here is my BltPlayer Sub, and there is nothing about blting the female side(that I'm aware of, and there was nothing about changing it in the tutorial I used)
Code:
Public Sub BltPlayer(ByVal Index As Long)
'****************************************************************
'* WHEN        WHO        WHAT
'* ----        ---        ----
'* 07/12/2005  Shannara   Optimized function.
'****************************************************************

Dim Anim As Byte
Dim x As Long, y As Long

    ' Only used if ever want to switch to blt rather then bltfast
    With rec_pos
        .top = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset
        .Bottom = .top + PIC_Y
        .Left = GetPlayerX(Index) * PIC_X + Player(Index).XOffset
        .Right = .Left + PIC_X
    End With
    
    ' Check for animation
    Anim = 0
    If Player(Index).Attacking = 0 Then
        Select Case GetPlayerDir(Index)
            Case DIR_UP
                If (Player(Index).YOffset < PIC_Y / 2) Then Anim = 1
            Case DIR_DOWN
                If (Player(Index).YOffset < PIC_Y / 2 * -1) Then Anim = 1
            Case DIR_LEFT
                If (Player(Index).XOffset < PIC_Y / 2) Then Anim = 1
            Case DIR_RIGHT
                If (Player(Index).XOffset < PIC_Y / 2 * -1) Then Anim = 1
        End Select
    Else
        If Player(Index).AttackTimer + 500 > GetTickCount Then
            Anim = 2
        End If
    End If
    
    ' Check to see if we want to stop making him attack
    With Player(Index)
        If .AttackTimer + 1000 < GetTickCount Then
            .Attacking = 0
            .AttackTimer = 0
        End If
    End With
    
    With rec
        .top = GetPlayerSprite(Index) * PIC_Y
        .Bottom = .top + PIC_Y
        .Left = (GetPlayerDir(Index) * 3 + Anim) * PIC_X
        .Right = .Left + PIC_X
    End With
    
    x = GetPlayerX(Index) * PIC_X + Player(Index).XOffset
    y = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset - 4
    
    ' Check if its out of bounds because of the offset
    If y < 0 Then
        y = 0
        With rec
            .top = .top + (y * -1)
        End With
    End If
        
    Call DD_BackBuffer.BltFast(x, y, DD_SpriteSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
End Sub
Would I have to make a variable that checks for the other gender?


- Dr. Spoon - 26-10-2006

this is almost too easy..
Code:
Class(i).MaleSprite = GetVar(FileName, "CLASS", "MaleSprite")
should be
Code:
Class(i).MaleSprite = GetVar(FileName, "CLASS" & i, "MaleSprite")