J.C. SolvoTerra 109 Eat, Sleep, Code, Repeat Featured Poster

Here is the un-edited winform version so you yourself can investigate at the same time. I've included some aditional comments so you can see whats going on. Note: This is only a conversion from console to WinForms so you can play too.

J.C. SolvoTerra 109 Eat, Sleep, Code, Repeat Featured Poster

Sorry Deep Modi, I think I missunderstood what you wrote there "Someone more are interested"? Are you saying I am not interested or you don't want my help?

I have converted your given project into winforms... I have figured out how to read the byte information and what's stored where and am currently in the process of 1. Overwriting the original bytes with your new image (pixel and pallette data), and 2. totally rebuilding the wad file with new images.

Also Note, there are 4 MIPs in total per texture in a WAD3 file, th sizes are 1, 1\4, 1\16, and 1\64.

I have to work and I have my own projects, I can't guarantee a week, there's no documentation at all on this.

J.C. SolvoTerra 109 Eat, Sleep, Code, Repeat Featured Poster

Hang in there Deep Modi. I think i've found how to extract contents of a Wad file. Give me time to familiarise myself with it and I'll see what I can do.

Deep Modi commented: Ok, You can take some time, (please target upto this week) +4
J.C. SolvoTerra 109 Eat, Sleep, Code, Repeat Featured Poster

I think this thread needs flagging as solved... like 18 posts ago

J.C. SolvoTerra 109 Eat, Sleep, Code, Repeat Featured Poster

I need to apologise to Reverand Jim for my prior outburst, and indeed to the other participants on this thread. It was rude and uncalled for.

@Deep Modi. None of us know the format but aligulsoomro asked for the method to include the use of "-". We cant assume the ID is not 2234-5678... but assume it will be -12345678.

Reverend Jim commented: No problem. +12
J.C. SolvoTerra 109 Eat, Sleep, Code, Repeat Featured Poster

That's not quite there as a solution Deep Modi, for example IsNumeric(1234-5678-91011) [depending on the ID format] would return false. Also clearing a user input isn't cool beans. It could get increddibly frustrating having to re-type the whole ID each time there was a mistake.

J.C. SolvoTerra 109 Eat, Sleep, Code, Repeat Featured Poster

It would also be important prevent a user from Pasting as all these solutions would be rendered useless

TextBox1.ShortcutsEnabled=False
J.C. SolvoTerra 109 Eat, Sleep, Code, Repeat Featured Poster

I'm sorry Reverend Jim... I find the reasnoble alternative solution I provided quite acceptable and much more versatile. Not good coding? I'm sorry sweet heart, did I venture away from your solution. Find a bug in my solution and I'll reconsider the fact you aren't just power tripping. A down vote for an alternative... grow up.

J.C. SolvoTerra 109 Eat, Sleep, Code, Repeat Featured Poster

I find this method really useful. AllowedCodes also holds values for Delete, BackSpace, Home, End, Numeric Keypad Numbers, Standard Numbers etc.

    Private Sub TextBox1_KeyDown(sender As Object, e As KeyEventArgs) Handles TextBox1.KeyDown


        If Not (KeyAllowed(e.KeyCode)) Then e.SuppressKeyPress = True

    End Sub

    Private Function KeyAllowed(Key As System.Windows.Forms.Keys) As Boolean

        Console.WriteLine(Key)

        Dim AllowedCodes() As Byte = {35, 36, 46, 37, 38, 39, 40, 8, 189 _
                                     , 45, 48, 48, 50, 51, 52, 53, 54, 55, 56, 57 _
                                     , 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 109}

        If AllowedCodes.Contains(CInt(Key)) Then
            Return True
        Else
            Return False
        End If

    End Function

I find this way you can ammend your allowed list with the greatest of ease.