Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
This AI stuff is SCARY!!!
#33
It doesnt work, but with me giving subtle hints and QB64 rules...very soon it will! i could have done it myself, over many weeks/months/years but this "not quite right but close enough" assistance is to me at least, invaluable...i've also already got it to make EVERYTHING i need for Quake 2 BSP maps too! Its like "SANYO", not quite "SONY" but it'll play your tapes!

As QB64 is such a basic language...anyone who thinks me using AI to push/speed up/expand functionality....well, me thinks you and Clippy will have a good old time discussing it whilst I crack on! 

Code: (Select All)

Code: (Select All)
SUB GDK2_GL_BSP_Load (BSP AS GDK2_GL_BSP, File$)
    DIM FFile& AS INTEGER
    DIM CurrentLump AS BSP_D_Entry

    IF _FILEEXISTS(File$) THEN
        FFile& = FREEFILE
        OPEN File$ FOR BINARY AS #FFile&
       
        ' Get header data
        GET #FFile&, 1, BSP.Header

        ' Make _MEM pointers for all lumps and get the data
        ' Entities lump is text data, typically read separately.
       
        ' Plane data (Lump 1)
        CurrentLump = BSP.Header.Planes
        IF CurrentLump.Size > 0 THEN
            BSP.Plane_Data = _MEMNEW(CurrentLump.Size)
            GET #FFile&, CurrentLump.Offset + 1, BSP.Plane_Data, CurrentLump.Size
        END IF

        ' MipTex data (Lump 2)
        CurrentLump = BSP.Header.MipTex
        IF CurrentLump.Size > 0 THEN
            BSP.MipTex_Data = _MEMNEW(CurrentLump.Size)
            GET #FFile&, CurrentLump.Offset + 1, BSP.MipTex_Data, CurrentLump.Size
        END IF

        ' Vertex data (Lump 3)
        CurrentLump = BSP.Header.Vertices
        IF CurrentLump.Size > 0 THEN
            BSP.Vertex_Data = _MEMNEW(CurrentLump.Size)
            GET #FFile&, CurrentLump.Offset + 1, BSP.Vertex_Data, CurrentLump.Size
        END IF
       
        ' VisiList data (Lump 4)
        CurrentLump = BSP.Header.VisiList
        IF CurrentLump.Size > 0 THEN
            BSP.VisiList_Data = _MEMNEW(CurrentLump.Size)
            GET #FFile&, CurrentLump.Offset + 1, BSP.VisiList_Data, CurrentLump.Size
        END IF
       
        ' Node data (Lump 5)
        CurrentLump = BSP.Header.Nodes
        IF CurrentLump.Size > 0 THEN
            BSP.Node_Data = _MEMNEW(CurrentLump.Size)
            GET #FFile&, CurrentLump.Offset + 1, BSP.Node_Data, CurrentLump.Size
        END IF
       
        ' TexInfo data (Lump 6)
        CurrentLump = BSP.Header.TexInfo
        IF CurrentLump.Size > 0 THEN
            BSP.Texture_Data = _MEMNEW(CurrentLump.Size)
            GET #FFile&, CurrentLump.Offset + 1, BSP.Texture_Data, CurrentLump.Size
        END IF
       
        ' Face data (Lump 7)
        CurrentLump = BSP.Header.Faces
        IF CurrentLump.Size > 0 THEN
            BSP.Face_Data = _MEMNEW(CurrentLump.Size)
            GET #FFile&, CurrentLump.Offset + 1, BSP.Face_Data, CurrentLump.Size
        END IF
       
        ' LightMaps data (Lump 8)
        CurrentLump = BSP.Header.LightMaps
        IF CurrentLump.Size > 0 THEN
            BSP.L_Map_Data = _MEMNEW(CurrentLump.Size)
            GET #FFile&, CurrentLump.Offset + 1, BSP.L_Map_Data, CurrentLump.Size
        END IF
       
        ' Clip Node data (Lump 9)
        CurrentLump = BSP.Header.ClipNodes
        IF CurrentLump.Size > 0 THEN
            BSP.ClipNode_Data = _MEMNEW(CurrentLump.Size)
            GET #FFile&, CurrentLump.Offset + 1, BSP.ClipNode_Data, CurrentLump.Size
        END IF
       
        ' Leaf data (Lump 10)
        CurrentLump = BSP.Header.Leaves
        IF CurrentLump.Size > 0 THEN
            BSP.Leaf_Data = _MEMNEW(CurrentLump.Size)
            GET #FFile&, CurrentLump.Offset + 1, BSP.Leaf_Data, CurrentLump.Size
        END IF
       
        ' ListFace (MarkSurfaces) data (Lump 11)
        CurrentLump = BSP.Header.ListFace
        IF CurrentLump.Size > 0 THEN
            BSP.FaceList_Data = _MEMNEW(CurrentLump.Size)
            GET #FFile&, CurrentLump.Offset + 1, BSP.FaceList_Data, CurrentLump.Size
        END IF
       
        ' Edge data (Lump 13)
        CurrentLump = BSP.Header.Edges
        IF CurrentLump.Size > 0 THEN
            BSP.Edge_Data = _MEMNEW(CurrentLump.Size)
            GET #FFile&, CurrentLump.Offset + 1, BSP.Edge_Data, CurrentLump.Size
        END IF
       
        ' Edge List data (Lump 14)
        CurrentLump = BSP.Header.ListEdges
        IF CurrentLump.Size > 0 THEN
            BSP.EdgeList_Data = _MEMNEW(CurrentLump.Size)
            GET #FFile&, CurrentLump.Offset + 1, BSP.EdgeList_Data, CurrentLump.Size
        END IF
       
        ' Model data (Lump 15)
        CurrentLump = BSP.Header.Models
        IF CurrentLump.Size > 0 THEN
            BSP.Model_Data = _MEMNEW(CurrentLump.Size)
            GET #FFile&, CurrentLump.Offset + 1, BSP.Model_Data, CurrentLump.Size
        END IF

        CLOSE #FFile&
    END IF
END SUB

AI is my b*thc and i'll be damned if QB is to remain a forgotten language! BASIC it maybe but only in syntax, it's future is bright! (well as long as lighting is enabled!) and even if i get no responses to posts or simply ignored...I WILL PUSH IT!

Unseen, Unforgiving and Unphased!
Reply


Messages In This Thread
This AI stuff is SCARY!!! - by Unseen Machine - 08-04-2025, 03:49 AM
RE: This AI stuff is SCARY!!! - by Pete - 08-04-2025, 04:00 AM
RE: This AI stuff is SCARY!!! - by Unseen Machine - 08-05-2025, 03:12 AM
RE: This AI stuff is SCARY!!! - by Pete - 08-06-2025, 05:23 PM
RE: This AI stuff is SCARY!!! - by Dimster - 08-11-2025, 02:22 PM
RE: This AI stuff is SCARY!!! - by bplus - 08-11-2025, 02:33 PM
RE: This AI stuff is SCARY!!! - by bplus - 08-11-2025, 03:58 PM
RE: This AI stuff is SCARY!!! - by Dimster - 08-11-2025, 06:24 PM
RE: This AI stuff is SCARY!!! - by Pete - 08-11-2025, 11:11 PM
RE: This AI stuff is SCARY!!! - by Pete - 08-12-2025, 12:36 PM
RE: This AI stuff is SCARY!!! - by Dimster - 08-12-2025, 01:32 PM
RE: This AI stuff is SCARY!!! - by SMcNeill - 08-12-2025, 02:02 PM
RE: This AI stuff is SCARY!!! - by Dimster - 08-12-2025, 02:53 PM
RE: This AI stuff is SCARY!!! - by madscijr - 08-12-2025, 03:24 PM
RE: This AI stuff is SCARY!!! - by Pete - 08-12-2025, 07:19 PM
RE: This AI stuff is SCARY!!! - by madscijr - 08-12-2025, 10:51 PM
RE: This AI stuff is SCARY!!! - by Dimster - 08-13-2025, 12:07 PM
RE: This AI stuff is SCARY!!! - by Pete - 08-13-2025, 04:56 PM
RE: This AI stuff is SCARY!!! - by Dimster - 08-13-2025, 07:25 PM
RE: This AI stuff is SCARY!!! - by PhilOfPerth - 08-13-2025, 10:26 PM
RE: This AI stuff is SCARY!!! - by Unseen Machine - 08-14-2025, 12:05 AM
RE: This AI stuff is SCARY!!! - by Pete - 08-14-2025, 12:08 AM
RE: This AI stuff is SCARY!!! - by Pete - 08-14-2025, 07:58 PM
RE: This AI stuff is SCARY!!! - by Unseen Machine - 08-26-2025, 12:11 AM
RE: This AI stuff is SCARY!!! - by Pete - 08-27-2025, 10:41 PM
RE: This AI stuff is SCARY!!! - by OldMoses - 08-28-2025, 12:11 PM
RE: This AI stuff is SCARY!!! - by Dimster - 08-28-2025, 02:43 PM
RE: This AI stuff is SCARY!!! - by Pete - 08-28-2025, 03:14 PM
RE: This AI stuff is SCARY!!! - by SMcNeill - 08-28-2025, 04:33 PM
RE: This AI stuff is SCARY!!! - by Dimster - 08-28-2025, 06:36 PM
RE: This AI stuff is SCARY!!! - by Pete - 08-28-2025, 07:13 PM
RE: This AI stuff is SCARY!!! - by Helium5793 - 08-29-2025, 12:27 PM
RE: This AI stuff is SCARY!!! - by madscijr - 08-30-2025, 12:04 AM
RE: This AI stuff is SCARY!!! - by Unseen Machine - 08-30-2025, 12:39 AM
RE: This AI stuff is SCARY!!! - by Unseen Machine - 08-30-2025, 05:22 AM
RE: This AI stuff is SCARY!!! - by madscijr - 08-30-2025, 05:34 AM
RE: This AI stuff is SCARY!!! - by Unseen Machine - 08-30-2025, 07:06 AM
RE: This AI stuff is SCARY!!! - by Unseen Machine - 10-20-2025, 09:07 AM
RE: This AI stuff is SCARY!!! - by bplus - 10-20-2025, 12:09 PM
RE: This AI stuff is SCARY!!! - by Unseen Machine - 10-20-2025, 12:45 PM
RE: This AI stuff is SCARY!!! - by bplus - 10-20-2025, 02:23 PM
RE: This AI stuff is SCARY!!! - by Dimster - 10-20-2025, 03:02 PM
RE: This AI stuff is SCARY!!! - by bplus - 10-20-2025, 03:13 PM
RE: This AI stuff is SCARY!!! - by Unseen Machine - 10-20-2025, 03:15 PM
RE: This AI stuff is SCARY!!! - by Unseen Machine - 10-20-2025, 03:21 PM
RE: This AI stuff is SCARY!!! - by madscijr - 10-22-2025, 03:10 PM
RE: This AI stuff is SCARY!!! - by SMcNeill - 10-22-2025, 04:10 PM
RE: This AI stuff is SCARY!!! - by Pete - 10-22-2025, 02:45 PM
RE: This AI stuff is SCARY!!! - by Pete - 10-22-2025, 03:55 PM
RE: This AI stuff is SCARY!!! - by Pete - 10-22-2025, 04:30 PM
RE: This AI stuff is SCARY!!! - by SMcNeill - 10-22-2025, 04:34 PM
RE: This AI stuff is SCARY!!! - by PhilOfPerth - 10-22-2025, 10:26 PM
RE: This AI stuff is SCARY!!! - by JRace - 10-22-2025, 10:38 PM
RE: This AI stuff is SCARY!!! - by PhilOfPerth - 10-22-2025, 11:15 PM
RE: This AI stuff is SCARY!!! - by madscijr - 10-23-2025, 01:50 AM
RE: This AI stuff is SCARY!!! - by bplus - 10-22-2025, 11:40 PM
RE: This AI stuff is SCARY!!! - by madscijr - 10-22-2025, 10:37 PM
RE: This AI stuff is SCARY!!! - by bplus - 10-22-2025, 11:33 PM
RE: This AI stuff is SCARY!!! - by Pete - 10-23-2025, 01:03 AM
RE: This AI stuff is SCARY!!! - by Unseen Machine - 10-23-2025, 02:15 AM
RE: This AI stuff is SCARY!!! - by Unseen Machine - 10-23-2025, 02:35 AM
RE: This AI stuff is SCARY!!! - by madscijr - 10-23-2025, 02:55 AM
RE: This AI stuff is SCARY!!! - by dbox - 10-23-2025, 02:20 PM
RE: This AI stuff is SCARY!!! - by madscijr - 10-23-2025, 02:57 PM
RE: This AI stuff is SCARY!!! - by Unseen Machine - 10-26-2025, 02:08 AM
RE: This AI stuff is SCARY!!! - by madscijr - 10-26-2025, 02:44 AM
RE: This AI stuff is SCARY!!! - by Unseen Machine - 10-26-2025, 03:17 AM
RE: This AI stuff is SCARY!!! - by Unseen Machine - 10-30-2025, 12:12 AM
RE: This AI stuff is SCARY!!! - by madscijr - 10-30-2025, 01:03 AM
RE: This AI stuff is SCARY!!! - by madscijr - 10-30-2025, 01:30 PM
RE: This AI stuff is SCARY!!! - by Unseen Machine - 11-20-2025, 03:48 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)