Aktuelle Zeit: 15.11.2018 20:26

Alle Zeiten sind UTC + 1 Stunde [ Sommerzeit ]




Ein neues Thema erstellen Auf das Thema antworten  [ 215 Beiträge ]  Gehe zu Seite Vorherige  1 ... 18, 19, 20, 21, 22  Nächste
Autor Nachricht
 Betreff des Beitrags: Re: MP3D Alpha 32
BeitragVerfasst: 21.05.2016 03:44 
Offline
Benutzeravatar

Registriert: 20.06.2013 23:27
Micha,
hab eine Frage um laden eines externen *.3ds Objektes.
Ich hab ein test dingens geschrieben. startet auch alles. aber es braucht ewig lange bis das *.3ds vom Code analysiert wurde. Kannst du mir sagen woran das liegt? denn im Demomaker von Epyx geht das starten der exe mit einem 3ds Objekt ja auch ruckzuck. die *.3ds datei ist nur 3kb groß
hier noch die externals: http://filehorst.de/d/bqojHmbf
Code:
;=======================================================================
;
;
; first of all:
; install the whole FXlibs -> MP3D Lib
; http://www.flasharts.de/mpz/mp33_beta/MP3D_Installer.exe
; then
; Goto: Compiler -> Compiler Options -> Library Subsystem and input: DX9
;
; then
; Install: pureColor lib by Gnozal
; http://www.rsbasic.de/backupprogramme/PureCOLOR_440.zip
;
;=======================================================================

EP_InitFXLib()          ; don't forget this
UsePNGImageDecoder()    ; handle png decoding
InitSprite()            ; initialize sprites

;declare values for 3D rotating object   
 Structure D3DXVECTOR3
   a.f
   b.f
   c.f
 EndStructure

;-Prepare and Declare Items, Objects
Enumeration
;{
  ;Objects Button Patch
    #Btn_Patch
    #Btn_Patch_Frame_Left
    #Btn_Patch_Frame_Right
    #Btn_Patch_Frame_Top
    #Btn_Patch_Frame_Bottom
  ;Objects Button About
    #Btn_About
    #Btn_About_Frame_Left
    #Btn_About_Frame_Right
    #Btn_About_Frame_Top
    #Btn_About_Frame_Bottom
  ;Objects Button Exit
    #Btn_Exit
    #Btn_Exit_Frame_Left
    #Btn_Exit_Frame_Right
    #Btn_Exit_Frame_Top
    #Btn_Exit_Frame_Bottom
  ;Objects Application
    #Txt_Application
    #Inputfield_Application
    #Inputfield_Application_Frame
  ;Objects Website
    #Txt_Website
    #Inputfield_Website
    #Inputfield_Website_Frame
  ;Objects Cracker
    #Txt_Cracker
    #Inputfield_Cracker
    #Inputfield_Cracker_Frame
  ;Objects Released On
    #Txt_Released_On
    #Inputfield_Released_On
    #Inputfield_Released_On_Frame
  ;Objects Info
    #Txt_Info
    #Inputfield_Info
    #Inputfield_Info_Frame
  ;FRAME AROUND KEYGEN
    #Window_Frame_Left
    #Window_Frame_Right
    #Window_Frame_Top
    #Window_Frame_Bottom
EndEnumeration
;} 
 
; Define Mouse Cursor --> Hand on hover Buttons
Define Btn_Patch, Btn_About, Btn_Exit

; Define programm startup effects
  #AW_HOR_POSITIVE = $1 ;Animates the window from left To right. This flag can be used with roll Or slide animation.
  #AW_HOR_NEGATIVE = $2 ;Animates the window from right To left. This flag can be used with roll Or slide animation.
  #AW_VER_POSITIVE = $4 ;Animates the window from top To bottom. This flag can be used with roll Or slide animation.
  #AW_VER_NEGATIVE = $8 ;Animates the window from bottom To top. This flag can be used with roll Or slide animation.
  #AW_CENTER = $10      ;Makes the window appear To collapse inward If AW_HIDE is used Or expand outward If the AW_HIDE is not used.
  #AW_HIDE = $10000     ;Hides the window. By default, the window is shown.
  #AW_ACTIVATE = $20000 ;Activates the window.
  #AW_SLIDE = $40000    ;Uses slide animation. By default, roll animation is used.
  #AW_BLEND = $80000    ;Uses a fade effect. This flag can be used only If hwnd is a top-level window.

; Grab Tool with Mouse
Procedure WinCallback(hWnd, uMsg, wParam, lParam)
  Protected result = #PB_ProcessPureBasicEvents
  Select uMsg
    Case #WM_LBUTTONDOWN
     
      SendMessage_(hWnd, #WM_NCLBUTTONDOWN, #HTCAPTION, 0)
     
  EndSelect
  ProcedureReturn result
EndProcedure

;Load externals Sound, GFX, Font
 DataSection
 
;{ LOGO
   Logo:
    IncludeBinary "Gfx\uret_new.png"
   LogoEnd:
;}     
;{ Font
   Font:
    IncludeBinary "Gfx\pix16.png"
   FontEnd:
  ;} 
;{ Song     
   Song:
    IncludeBinary "Sound\ethical_drug.v2m"
;}
;{ FRAME & SHADOW
   FrameShadow:
    IncludeBinary "Gfx\frame_shadow.png"
   EndFrameShadow:
 ;}
;{ 3D Object: *.3ds
   ObjectStart:
    IncludeBinary "3D_Object\2 sternchen.3DS"
   ObjectEnd:
;}   
   
 EndDataSection         
 
;-MAIN WINDOW
  hWnd =  OpenWindow(0, 732, 301, 540, 610, "", #PB_Window_ScreenCentered | #PB_Window_BorderLess | #PB_Window_Invisible) ;#PB_Window_Invisible = hide window while creating
 
 ;-HANDLE 3D SCREEN
   MP_ScreenToHandle(WindowID(0)) ;MAKE window "0" as Demo 3D Effect screen
   
   ;Define some Jumping Rasterbars with Fast Creating
    For t = 2 To 7
      EP_FastRasterBar(t, RGB(Random(255),Random(255),Random(255)), 22, 200,2, 200+(t*20), 2)
    Next t
   
   ;-SET WINDOW ALWAYS ON TOP
      SetWindowPos_(WindowID(0),#HWND_TOPMOST,0,0,0,0,#SWP_NOMOVE|#SWP_NOSIZE)
      SetWindowColor(0,RGB(4, 0, 9))

      ; Cursor SETTING for HAND SYMBOL
        SetClassLong_(Btn_Exit, #GCL_HCURSOR, 0) ; define hand cursor: hover Exit button
      ; LOAD Cursor
        cur1 = LoadCursor_(0, #IDC_HAND)
       
      ; SYSTEM FONTs for Inputfields and Headlines
        Font1 = LoadFont(#PB_Any, "Microsoft Sans Serif", 10, #PB_Font_HighQuality)
        Font2 = LoadFont(#PB_Any, "Microsoft Sans Serif", 10, #PB_Font_HighQuality)
      ;=================================================================================================================
      ;=================================================================================================================
      ; Here start: the creation of all INPUTFIELDS
;{ 
      ;-SHOW TEXT: Application 
        TextGadget(#Txt_Application, 18,290,75,20, "Application:")
        SetGadgetColor(#Txt_Application, #PB_Gadget_BackColor, RGB(4, 0, 9))    ;TEXT Background Color
        SetGadgetColor(#Txt_Application, #PB_Gadget_FrontColor, RGB(78, 71, 71));Font color
        SetGadgetFont(#Txt_Application, FontID(Font1))
       
        ;-SHOW 1px Frame around Application Inputfield
          TextGadget(#Inputfield_Application_Frame, 16, 309, 505, 20, "")               ;Frame size
          SetGadgetColor(#Inputfield_Application_Frame, #PB_Gadget_BackColor, $454543)  ;Frame Color
     
        ;-SHOW Inputfield: Application
          StringGadget(#Inputfield_Application, 17, 310, 503, 18, " Enter Application Name",#PB_String_BorderLess)
          SetGadgetFont(#Inputfield_Application, FontID(Font2)) ;Inputfield description Font
          ;Background color: Inputfield
           SetGadgetColor(#Inputfield_Application, #PB_Gadget_BackColor, RGB(34, 35, 38))
          ;Font color: Inputfield
           SetGadgetColor(#Inputfield_Application, #PB_Gadget_FrontColor, RGB(102, 104, 106))
      ;=================================================================================================================
      ;
      ;-SHOW TEXT: Website 
        TextGadget(#Txt_Website, 18,335,75,20, "Website:")
        SetGadgetColor(#Txt_Website, #PB_Gadget_BackColor, RGB(4, 0, 9))    ;TEXT Background Color
        SetGadgetColor(#Txt_Website, #PB_Gadget_FrontColor, RGB(78, 71, 71));Font color
        SetGadgetFont(#Txt_Website, FontID(Font1))
       
        ;-SHOW 1px Frame around Website Inputfield
          TextGadget(#Inputfield_Website_Frame, 16, 354, 505, 20, "")               ;Frame size
          SetGadgetColor(#Inputfield_Website_Frame, #PB_Gadget_BackColor, $454543)  ;Frame Color
               
        ;-SHOW Inputfield: Website   
          StringGadget(#Inputfield_Website, 17, 355, 503, 18, " Enter Website",#PB_String_BorderLess)
          SetGadgetFont(#Inputfield_Website, FontID(Font2)) ;Inputfield description Font
          ;Background color: Inputfield
           SetGadgetColor(#Inputfield_Website, #PB_Gadget_BackColor, RGB(34, 35, 38))
          ;Font color: Inputfield
           SetGadgetColor(#Inputfield_Website, #PB_Gadget_FrontColor, RGB(102, 104, 106))   
      ;=================================================================================================================
      ;     
      ;-SHOW TEXT: Cracker 
        TextGadget(#Txt_Cracker, 18,380,75,20, "Cracker:")
        SetGadgetColor(#Txt_Cracker, #PB_Gadget_BackColor, RGB(4, 0, 9))    ;TEXT Background Color
        SetGadgetColor(#Txt_Cracker, #PB_Gadget_FrontColor, RGB(78, 71, 71));Font color
        SetGadgetFont(#Txt_Cracker, FontID(Font1))
       
        ;-SHOW 1px Frame around Cracker Inputfield
          TextGadget(#Inputfield_Cracker_Frame, 16, 399, 505, 20, "")               ;Frame size
          SetGadgetColor(#Inputfield_Cracker_Frame, #PB_Gadget_BackColor, $454543)  ;Frame Color
               
        ;-SHOW Inputfield: Cracker
          StringGadget(#Inputfield_Cracker, 17, 400, 503, 18, " Cracked by",#PB_String_BorderLess)
          SetGadgetFont(#Inputfield_Cracker, FontID(Font2)) ;Inputfield description Font
          ;Background color: Inputfield
           SetGadgetColor(#Inputfield_Cracker, #PB_Gadget_BackColor, RGB(34, 35, 38))
          ;Font color: Inputfield
           SetGadgetColor(#Inputfield_Cracker, #PB_Gadget_FrontColor, RGB(102, 104, 106))
      ;=================================================================================================================
      ;
      ;-SHOW TEXT: Released On 
        TextGadget(#Txt_Released_On, 18,425,75,20, "Released On:")
        SetGadgetColor(#Txt_Released_On, #PB_Gadget_BackColor, RGB(4, 0, 9))    ;TEXT Background Color
        SetGadgetColor(#Txt_Released_On, #PB_Gadget_FrontColor, RGB(78, 71, 71));Font color
        SetGadgetFont(#Txt_Released_On, FontID(Font1))
       
        ;-SHOW 1px Frame around Released On Inputfield
          TextGadget(#Inputfield_Released_On_Frame, 16, 443, 505, 20, "")               ;Frame size
          SetGadgetColor(#Inputfield_Released_On_Frame, #PB_Gadget_BackColor, $454543)  ;Frame Color
           
        ;-SHOW Inputfield: Released On
          StringGadget(#Inputfield_Released_On, 17, 444, 503, 18, " Release Date",#PB_String_BorderLess)
          SetGadgetFont(#Inputfield_Released_On, FontID(Font2)) ;Inputfield description Font
          ;Background color: Inputfield
           SetGadgetColor(#Inputfield_Released_On, #PB_Gadget_BackColor, RGB(34, 35, 38))
          ;Font color: Inputfield
           SetGadgetColor(#Inputfield_Released_On, #PB_Gadget_FrontColor, RGB(102, 104, 106))
      ;=================================================================================================================
      ;
      ;-SHOW TEXT: Info
        TextGadget(#Txt_Info, 18,470,75,20, "Info:")
        SetGadgetColor(#Txt_Info, #PB_Gadget_BackColor, RGB(4, 0, 9))    ;TEXT Background Color
        SetGadgetColor(#Txt_Info, #PB_Gadget_FrontColor, RGB(78, 71, 71));Font color
        SetGadgetFont(#Txt_Info, FontID(Font1))
       
        ;-SHOW 1px Frame around Info Inputfield
          TextGadget(#Inputfield_Info_Frame, 16, 487, 505, 54, "")               ;Frame size
          SetGadgetColor(#Inputfield_Info_Frame, #PB_Gadget_BackColor, $454543)  ;Frame Color
               
        ;-SHOW Inputfield: Info
          StringGadget(#Inputfield_Info, 17, 488, 503, 52, " 1. Patch the Software" + #CRLF$ + " 2. Hit the Patch Button to crack the Software" + #CRLF$ + " 3. Enjoy",#ES_MULTILINE|#PB_String_ReadOnly|#PB_String_BorderLess)
          SetGadgetFont(#Inputfield_Info, FontID(Font2)) ;Inputfield description Font
          ;Background color: Inputfield
           SetGadgetColor(#Inputfield_Info, #PB_Gadget_BackColor, RGB(34, 35, 38))
          ;Font color: Inputfield
           SetGadgetColor(#Inputfield_Info, #PB_Gadget_FrontColor, RGB(102, 104, 106))
;}
      ;=================================================================================================================
      ;=================================================================================================================
      ;-CREATE BUTTONS
;{     
        ;-SHOW 1px Frame around BTN PATCH
           ;Left
            TextGadget(#Btn_Patch_Frame_Left, 16, 559, 1, 32, "")                 ;Frame size
            SetGadgetColor(#Btn_Patch_Frame_Left, #PB_Gadget_BackColor, $454543)  ;Frame Color
           ;Right
            TextGadget(#Btn_Patch_Frame_Right, 117, 559, 1, 32, "")               ;Frame size
            SetGadgetColor(#Btn_Patch_Frame_Right, #PB_Gadget_BackColor, $454543) ;Frame Color
           ;Top
            TextGadget(#Btn_Patch_Frame_Top, 16, 559, 102, 1, "")                 ;Frame size
            SetGadgetColor(#Btn_Patch_Frame_Top, #PB_Gadget_BackColor, $454543)   ;Frame Color
           ;Top
            TextGadget(#Btn_Patch_Frame_Bottom, 16, 590, 102, 1, "")              ;Frame size
            SetGadgetColor(#Btn_Patch_Frame_Bottom, #PB_Gadget_BackColor, $454543);Frame Color
           
          ;BTN PATCH
            Btn_Patch = ButtonGadget(#Btn_Patch, 17, 560, 100, 30, "Patch", #BS_FLAT)
            ;Font and Back color: BTN PATCH
              PureCOLOR_SetButtonColor(#Btn_Patch, RGB(102, 104, 106), RGB(0, 0, 0), RGB(102, 104, 106), RGB(28, 28, 28))
      ;=================================================================================================================       
      ;
        ;-SHOW 1px Frame around BTN ABOUT
           ;Left
            TextGadget(#Btn_About_Frame_Left, 219, 559, 1, 32, "")                ;Frame size
            SetGadgetColor(#Btn_About_Frame_Left, #PB_Gadget_BackColor, $454543)  ;Frame Color
           ;Right
            TextGadget(#Btn_About_Frame_Right, 320, 559, 1, 32, "")               ;Frame size
            SetGadgetColor(#Btn_About_Frame_Right, #PB_Gadget_BackColor, $454543) ;Frame Color
           ;Top
            TextGadget(#Btn_About_Frame_Top, 219, 559, 102, 1, "")                ;Frame size
            SetGadgetColor(#Btn_About_Frame_Top, #PB_Gadget_BackColor, $454543)   ;Frame Color
           ;Top
            TextGadget(#Btn_About_Frame_Bottom, 219, 590, 102, 1, "")             ;Frame size
            SetGadgetColor(#Btn_About_Frame_Bottom, #PB_Gadget_BackColor, $454543);Frame Color
             
          ;BTN ABOUT
            Btn_About = ButtonGadget(#Btn_About, 220, 560, 100, 30, "About", #BS_FLAT)
            ;Font and Back color: BTN ABOUT
              PureCOLOR_SetButtonColor(#Btn_About, RGB(102, 104, 106), RGB(0, 0, 0), RGB(102, 104, 106), RGB(28, 28, 28))
      ;=================================================================================================================
      ;       
        ;-SHOW 1px Frame around BTN EXIT
           ;Left
            TextGadget(#Btn_Exit_Frame_Left, 419, 559, 1, 32, "")                ;Frame size
            SetGadgetColor(#Btn_Exit_Frame_Left, #PB_Gadget_BackColor, $454543)  ;Frame Color 
           ;Right
            TextGadget(#Btn_Exit_Frame_Right, 520, 559, 1, 32, "")               ;Frame size
            SetGadgetColor(#Btn_Exit_Frame_Right, #PB_Gadget_BackColor, $454543) ;Frame Color
           ;Top
            TextGadget(#Btn_Exit_Frame_Top, 419, 559, 102, 1, "")                ;Frame size
            SetGadgetColor(#Btn_Exit_Frame_Top, #PB_Gadget_BackColor, $454543)   ;Frame Color
           ;Top
            TextGadget(#Btn_Exit_Frame_Bottom, 419, 590, 102, 1, "")             ;Frame size
            SetGadgetColor(#Btn_Exit_Frame_Bottom, #PB_Gadget_BackColor, $454543);Frame Color

          ;BTN EXiT
            Btn_Exit = ButtonGadget(#Btn_Exit, 420, 560, 100, 30, "Exit", #BS_FLAT)
            ;Font and Back color: BTN EXiT
             PureCOLOR_SetButtonColor(#Btn_Exit, RGB(102, 104, 106), RGB(0, 0, 0), RGB(102, 104, 106), RGB(28, 28, 28))
;}
      ;=================================================================================================================
      ;=================================================================================================================
      ;
        ; GIVE THE KEYGEN A 1PX Frame
           ;Left
            TextGadget(#Window_Frame_Left, 0, 0, 1, 610, "")                              ;Frame size
            SetGadgetColor(#Window_Frame_Left, #PB_Gadget_BackColor, RGB(102, 102, 102))  ;Frame Color
           ;Right
            TextGadget(#Window_Frame_Right, 539, 0, 1, 610, "")                           ;Frame size
            SetGadgetColor(#Window_Frame_Right, #PB_Gadget_BackColor, RGB(102, 102, 102)) ;Frame Color
           ;Top --> Not used in this KexGen
              ;TextGadget(#Window_Frame_Right, 0, 1, 540, 1, "")                            ;Frame size
              ;SetGadgetColor(#Window_Frame_Right, #PB_Gadget_BackColor, RGB(102, 102, 102));Frame Color
           ;Bottom
            TextGadget(#Window_Frame_Bottom, 0, 609, 540, 1, "")                            ;Frame size
            SetGadgetColor(#Window_Frame_Bottom, #PB_Gadget_BackColor, RGB(102, 102, 102));Frame Color
      ;=================================================================================================================
           
  ;-DEFINE SINUS FONT
    EP_CatchFont16(Sprite_4,?Font, ?FontEnd)
    EP_SetScrollText(Sprite_4, "            Group xyz proudly presents another quality release. Coded by: inc       3d object and Gfx: inc      Sound: ?       Greets Fly Out To:  CORE, ARTEAM,AT4RE,SND,FFF,CIN1TEAM,REiS,BLACK STORM,ZWT,AORE,LNDL,TSRH,RePT,iNFECTION,ECLiPSE,WOODMANN And All Other Who Keep The Scene Alive...            reload               ")
    EP_Create16Scroll(0, 0, 0,130, 0,560)
    EP_SetSinScroll16(0, 5, 0 , 30, 10) ;DEFINE BEHAVIOR BY SINUS
   
  ;-LOAD AND PLAY *.v2m Sound
    MP_CatchV2M(?Song)  ;LOAD SONG
    MP_PlayV2M(0)       ;0 START SOUND FROM THE BEGINNING
    IsPlaying=1         ;CHECK IF SONG IS PLAYING
    left.f              ;Set effect for Left Music Channel on 3D Object
    right.f             ;Set effect for Right Music Channel on 3D Object
   
  ;-LOGO, FRAME-SHADOW GFX
    Frame_Shadow = MP_CatchSprite(?FrameShadow, ?EndFrameShadow - ?FrameShadow) ;LOAD FRAME & SHADOW GFX FROM MEM
    Logo_Gfx = MP_CatchSprite(?Logo, ?LogoEnd) ;GRAB LOGO FROM MEM
   
  ;-3D OBJECT
    camera=MP_CreateCamera()            ; CREATE CAM
    x = 0 : y = 0 : xw = 540 : yw = 267 ; DEFINE SIZE OF THE DEMO EFFECT SCREEN HERE
    MP_Viewport(x,y,xw,yw)
    light=MP_CreateLight(1)             ; MAKE LIGHT
   
     Mesh1=MP_CatchMesh(?ObjectStart, ?ObjectEnd)
       
     MP_PositionEntity (Mesh1,0,0,200.0); POSITION 3D OBJECT, last number makes the size and Z Index of a 3D OBJECT
     MP_Wireframe(1)                    ; 3D OBJECT AS WIREFRAME. IF THIS LINE IS DISABLED: 3D OBJECT HAVE A TEXTURE
     
     If CreateImage(0, 15, 5)            ; Create coloured Wireframe
       MP_CreateImageColored(0,0,RGB($FF,$00,$FF),RGB($FF,$FF,$FF),RGB($00,$FF,$FF),RGB($FF,$00,$FF)) ; going to pink n purple
       MP_EntitySetTexture (mesh1, MP_ImageToTexture(0))
       FreeImage(0)
     EndIf
     
     a.f=0
     b.f=45
     c.f=135
     
  ;-SHOW a NORMAL SYSTEM Font for Text
    ;FONT IN THE RIGHT CORNER OF Demo 3D Effect screen
     font2 = MP_LoadFont ("Microsoft Sans Serif",12,0,0);"Fontname",SIZE,bold,italic
   
  ;in this KeyGen we use a 1px Dot Starfield
    ;-STARFIELD, prepare and settings
      EP_Init2DStars(50,7,0.3,1,1,539,263) ; 1st NUMBER=HOW MANY STARS,2nd NUMBER=LAYERS,0.3 = SCROLLSPEED,4rth NUMBER=where to start stars from the left side of the screen,5th NUMBER=where to start from top,6th x angle,7th y angle
      EP_2DStarsColor(2, RGB( 23, 50, 100)) ; STARS COLOR
   
  ; activate Procedure for Mouse option, so we can grab our Tool with the left Mouse Button
    SetWindowCallback(@WinCallback())
   
  ; use tool start up effect
    AnimateWindow_(WindowID(0),600,#AW_BLEND)
   
  ; Window background drawing is finished here, now show us all on the desktop 
    HideWindow(0,#False)


;=================================================================================================================
;
;-MAIN LOOP STARTS HERE
;
;=================================================================================================================     
Repeat
  Event = WindowEvent()
  Gosub changecursor ; goes to SUB and changes normal Cursor to HAND CURSOR over EXIT BTN or what ever
  MP_VSync(1) 

 
  ;-DRAW ROTATING STARFIELD   
    EP_2DStarsDraw()         ; DRAW simple STARFIELD
    EP_2DStarsDegree(b.f)    ; DEGREE OF STARS and ROTATE ALL
    b.f - 0.5
   
  ;-SCROLL TEXT NOW
    EP_Move16Scroll(0)
   
  ;- LOOP FUNCTION SOUND 
    If MP_IsPlayingV2M()
      IsPlaying=1 ;CHECK IF SONG IS PLAYING
      Else
       EndOfTrackReached=1 ;IF SONG REACHED ITS END
       ;RESTART PLAYBACK
       ; Delay(1000)   ;WAIT 1000 ms. AND START OVER FROM THE BEGINNING
        MP_PlayV2M(0) ;0 STARTs SONG At THE BEGINNING
    EndIf

  MP_DrawSprite(Frame_Shadow, 0, 0) ; SHOW Frame & Shadow
  MP_SpriteSetZ(Frame_Shadow, 0)    ; 0 = Z INDEX
  MP_DrawSprite(Logo_Gfx, 19, 20)   ; SHOW LOGO ON SCREEN
  MP_SpriteSetZ(Logo_Gfx, 9)        ; 9 IS Z-INDEX FOR LOGO
 
  ;-DRAW NORMAL TEXT ON SCREEN
    MP_DrawText (420,250,"Code by inc in 2016",font2,RGBA(76, 76, 76, 196),0,0) ; 0,0 ---> 2nd VALUE CAN SPIN TEXT
    MP_TextSetZ (0);SET TEXT ON Z INDEX FRONT
 
  ;-3D OBJECT
    MP_GetMainVUV2M(@left, @right)       ;stick 3D OBJECT to Music
    MP_ScaleEntity (mesh1,1,0.5+left*5,1);wobble 3D OBJECT to music
    a + 1.1:b-1.2:c+1.1 ; rotating speed
    MP_RotateEntity(mesh1,a, b, c)
   
  ;-DISPLAY THE MOVING RASTER BARS
    For t = 2 To 7 : EP_DisplayRasterBar(t,160+(t*10)) : Next t   
 
  ;-CREATE 3D WORLD and DO IT
    MP_RenderBegin()
      MP_RenderMesh()
      MP_Render2D ()
      MP_RenderSprite ()
      MP_RenderText ()
      MP_RenderEnd()
    MP_Flip ()

;////////////////////////////////////////
;-FUNCTIONS
  If Event = #PB_Event_Gadget
    Select EventGadget()
    ;AUTO highlight Inputfield on Mouse focus
      Case #Inputfield_Application, #Inputfield_Website, #Inputfield_Cracker, #Inputfield_Released_On
        If EventType() = #PB_EventType_Focus
          SendMessage_(GadgetID(EventGadget()), #EM_SETSEL, Len(GetGadgetText(EventGadget())), 0)
        EndIf
         
      ;///////////////////////////////////////////////////////////////
      ; APP- INPUT FIELD 
          Case #Inputfield_Application  ;do something when mouse focus
          ;NO CODE YET here
      ;///////////////////////////////////////////////////////////////
      ; WEBSITE- INPUT FIELD
          Case #Inputfield_Website      ;do something when mouse focus
          ;NO CODE YET here
      ;///////////////////////////////////////////////////////////////
      ; CRACKER- INPUT FIELD 
         Case #Inputfield_Cracker       ;do something when mouse focus
          ;NO CODE YET here
      ;///////////////////////////////////////////////////////////////
      ; Released On- INPUT FIELD 
          Case #Inputfield_Released_On  ;do something when mouse focus
          ;NO CODE YET here
      ;///////////////////////////////////////////////////////////////
      ; BUTTON: Patch 
          Case #Btn_Patch               ;do something when mouse focus
          ;NO CODE YET here
      ;///////////////////////////////////////////////////////////////
      ; BUTTON: About 
          Case #Btn_About               ;do something when mouse focus
          ;NO CODE YET here
      ;///////////////////////////////////////////////////////////////
           
      ;-EXIT BUTTON FUNCTION
          Case #Btn_Exit
            MP_StopV2M(0)       ;STOP MUSIC
            MP_FreeV2M()        ;FREE PLAYER
            EP_2DStarsClear()   ;CLEAR STARS OFF
            DestroyCursor_(cur1);REBUILD NORMAL CURSOR if KEYGEN is terminated
            End
    EndSelect
  EndIf
 
;-SUB ROUTINE FOR CURSOR CHANGE FROM ARROW TO HAND STARTS HERE
  Until Event = #PB_Event_CloseWindow
    DestroyCursor_(cur1) ;REBUILD NORMAL CURSOR if KEYGEN is terminated
    End     
    ;SUB ROUTINE TO CHANGE ARROW CURSOR TO HAND CURSOR
     changecursor:
     GetCursorPos_(cursorpos.POINT)
     MapWindowPoints_(0, hWnd, cursorpos, 1)
     Select ChildWindowFromPoint_(hWnd, cursorpos\x | cursorpos\y << 32)
       Case Btn_Patch: SetCursor_(cur1) ; Show hand Cursor OVER Btn_Patch
       Case Btn_About: SetCursor_(cur1) ; Show hand Cursor OVER Btn_About
       Case Btn_Exit : SetCursor_(cur1) ; Show hand Cursor OVER Btn_Exit     
     EndSelect
Return

_________________
PureBasic v5.30 + v5.44 LTS + v5.62 | Windows 7 x64 - Gforce GTX 950 - AMD FX6200 Six Core 3.80 | 26GB RAM


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags: Re: MP3D Alpha 32
BeitragVerfasst: 28.05.2016 15:38 
Offline
Benutzeravatar

Registriert: 14.06.2005 15:53
Wohnort: Berlin, Kreuzberg
Hi udg,

das einlesen von 3ds dauert wirklich lange. Ich muss das in der library kontrollieren und beheben. Schau ich mir an und sag Bescheid...

Gruß Michael

_________________
Working on - MP3D Engine -


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags: Re: MP3D Alpha 32
BeitragVerfasst: 28.05.2016 18:44 
Offline
Benutzeravatar

Registriert: 20.06.2013 23:27
danke :)

was mich auch noch interessiert,
wie kann ich eine grafik als Button benutzen?
Beispiel Auszug:
Code:
;////////////////////////////////////   
;- BUTTON FULLSCREEN
;////////////////////////////////////
      Fullscreen = MP_CatchSprite(?FullScreenButton, ?FullScreenButton_End - ?FullScreenButton)


wie gehts in der Schleife weiter?

alles probiert, so gut ich weis, aber nix funktioniert

denn normale Buttons od. TextGadget kann ich ja nicht über den DX Screen legen.



hier noch die Includes: http://www38.zippyshare.com/v/l2iQR1qI/file.html

Wie kann ich eine MP_Sprite Grafik als button nutzen?


Code:
InitKeyboard()
InitSprite()
EP_InitFXLib(); Handle Scroller
UsePNGImageDecoder()
;UseJPEGImageDecoder(); no *.jpg used yet
 
Enumeration
  #Wndw
  #SplashWindow
  #Exit_btn
  #Gadget_exit
  #Title
  #Title_Font
  #Music_Off
  #Music_Off_Font
  #Music_Resume
  #Music_Resume_Font
EndEnumeration

Define.i Event, EventWindow, EventGadget, EventType, EventMenu

;Define Exit Button
  CreateImage(#Exit_btn,22,22)
    StartDrawing(ImageOutput(#Exit_btn))
      FillArea(0,0,RGB(51, 66, 212),RGB(51, 66, 212))
      Line(3,18,16,-16,RGB(196, 196, 196))
      Line(3,3,17,17,RGB(196, 196, 196))
    StopDrawing()
 
; Define Tool Start Up Effect
#AW_CENTER = $10      ;Makes the window appear To collapse inward If AW_HIDE is used Or expand outward If the AW_HIDE is not used.
#AW_HIDE = $10000     ;Hides the window. By default, the window is shown.
#AW_ACTIVATE = $20000 ;Activates the window.
#AW_SLIDE = $40000    ;Uses slide animation. By default, roll animation is used.
#AW_BLEND = $80000    ;Uses a fade effect. This flag can be used only If hwnd is a top-level window.
DataSection
;{ Background Pic
  Background_Pic:
    IncludeBinary "GFX\relo-nebulus.png"
  Background_Pic_End:
;}
;{ Scanlines     
  Scanlines:
    IncludeBinary "GFX\scan3.png"
  Scanlines_End:
;}
;{ Font
   Font:
    IncludeBinary "Font\font_16x16.png"
   FontEnd:
;}
;{ Bubbles
   Bubbles:
   IncludeBinary "GFX\Bubbles.bmp"
   Bubbles_End:
;}
;{ FullScreenButton
   FullScreenButton:
   IncludeBinary "GFX\fullscreen.png"
   FullScreenButton_End:
;}
 EndDataSection

     
;////////////////////////////////////
;- MAIN WINDOW
;////////////////////////////////////
      OpenWindow(#Wndw, 553, 226, 640, 502, "", #PB_Window_ScreenCentered | #PB_Window_BorderLess | #PB_Window_Invisible)
      SetActiveWindow(#Wndw) ;keep our Tool active and wait for Keyboard input
      SetWindowColor(#Wndw,RGB(42, 94, 198))
;////////////////////////////////////
;- HANDLE 3D DX SCREEN
;////////////////////////////////////
      MP_ScreenToHandle(WindowID(#Wndw))   ;handle Window #Wndw as Demo 3D Effect screen
      x = 0 : y = 22 : xw = 640 : yw = 510 ;DEFINE SIZE OF THE DEMO EFFECT SCREEN HERE
      MP_Viewport(x,y,xw,yw)
;////////////////////////////////////   
;- BACKGROUND PICTURE
;////////////////////////////////////
      Background = MP_CatchSprite(?Background_Pic, ?Background_Pic_End - ?Background_Pic)
;////////////////////////////////////   
;- SCANLINES OVERLAYER
;////////////////////////////////////
      Scanlines = MP_CatchSprite(?Scanlines, ?Scanlines_End - ?Scanlines)
;////////////////////////////////////   
;- BUTTON FULLSCREEN
;////////////////////////////////////
      Fullscreen = MP_CatchSprite(?FullScreenButton, ?FullScreenButton_End - ?FullScreenButton)
;////////////////////////////////////
;- SINUS FONT
;////////////////////////////////////
      EP_CatchFont16(FontSprite,?Font, ?FontEnd)
      EP_SetScrollText(FontSprite, "   RETROLOADER V0.2 BY Inc... PLAY NEBULUS (AMIGA-VERSION) BY TRIFFIX ENTERTAINMENT 1987 +++ SIDTUNE STOLEN FROM HIGH VOLTAGE SID COLLECTION - TRACK: UNKOWN84 +++ GREETINGS TO CYRA - KAOS - NORTH - APPRENTICE - RETROBLAH - INFINITY(NES) - ZERSTAMPFER - JENS64 - HOUDINI - BRUN0 - CLASSIC-VIDEOGAMES - ARCADEZENTRUM - ARCADEINFO - CIRCUIT-BOARD - AND ALL PEOPLE OVER THE WORLD :D...            reload               ")
      EP_Create16Scroll(FontSprite, 0, 0,310, 0,700)
      EP_SetSinScroll16(FontSprite, 3, 0 , 150, 5) ;DEFINE BEHAVIOR BY SINUS: 3=?, 0= Letter height (0=Default) , 20= SinusHeight, 10= SinusWidth
;////////////////////////////////////   
;- LOAD SOME BUBBLES
;////////////////////////////////////     
      EP_CatchStarSprite(1,?Bubbles, ?Bubbles_End); Load a BubbleStarsprite
      EP_Init2DStars(50,7,0.5,-20,-18,660,520)    ; 1st NUMBER=HOW MANY BUBBLES,2nd NUMBER=LAYERS,0.3 = SCROLLSPEED,4rth NUMBER=where To start bubbles from the left side of the screen,5th NUMBER=where To start from top,6th x angle,7th y angle
;////////////////////////////////////
;- EXIT BUTTON
;////////////////////////////////////
      ImageGadget(#Gadget_exit,618,0,22,22,ImageID(#Exit_btn))
;////////////////////////////////////
;- TOOL TITLE
;////////////////////////////////////       
      TextGadget(#Title,0, 0, 608, 22, "  C64 retroplay",#SS_CENTERIMAGE)
      SetGadgetFont(#Title, LoadFont(#Title_Font, "Arial", 8, #PB_Font_HighQuality))
      SetGadgetColor(#Title , #PB_Gadget_BackColor, RGB(42, 94, 198))   ;TEXT Background Color
      SetGadgetColor(#Title , #PB_Gadget_FrontColor, RGB(248, 248, 248));TEXT Color
;////////////////////////////////////
;- MUSIC OFF BUTTON
;////////////////////////////////////     
      TextGadget(#Music_Off,558,0,50,22,"music off",#SS_CENTERIMAGE|#SS_NOTIFY|#SS_CENTER)
      SetGadgetFont(#Music_Off, LoadFont(#Music_Off_Font, "Arial", 8, #PB_Font_HighQuality))
      SetGadgetColor(#Music_Off , #PB_Gadget_BackColor, RGB(42, 94, 198))   ;TEXT Background Color
      SetGadgetColor(#Music_Off , #PB_Gadget_FrontColor, RGB(248, 248, 248));TEXT Color     
;////////////////////////////////////
;- MUSIC RESUME BUTTON
;////////////////////////////////////     
      TextGadget(#Music_Resume,558,0,50,22,"music on",#SS_CENTERIMAGE|#SS_NOTIFY|#SS_CENTER)
      SetGadgetFont(#Music_Resume, LoadFont(#Music_Resume_Font, "Arial", 8, #PB_Font_HighQuality))
      SetGadgetColor(#Music_Resume , #PB_Gadget_BackColor, RGB(42, 94, 198))   ;TEXT Background Color
      SetGadgetColor(#Music_Resume , #PB_Gadget_FrontColor, RGB(248, 248, 248));TEXT Color
      HideGadget(#Music_Resume,1)
     
      EP_InitFading(RGB(42, 94, 198), 1.0); 1.2 = fade speed
      ; fade in
        EP_SetFadeState(2)
;////////////////////////////////////   
;- USE TOOL START UP EFFECT
;////////////////////////////////////
      AnimateWindow_(WindowID(0),300,#AW_CENTER)
      HideWindow(0,#False)

;////////////////////////////////////
;
;- MAIN
;
;////////////////////////////////////
Repeat
 X=EP_FadeScreen(Richtung)
 
 MP_RenderWorld()
 Event = WindowEvent()
  EventGadget = EventGadget()
  EventType = EventType()

;////////////////////////////////////
;-ROTATE THE BUBBLES
;////////////////////////////////////
     EP_2DSpritesDraw(1)   ; DRAW BUBBLES
     EP_2DStarsDegree(b.f) ; RANDOM DEGREE
     b.f - 0.1
;////////////////////////////////////
;-SCROLL TEXT NOW
;////////////////////////////////////
      EP_Move16Scroll(0)
;////////////////////////////////////
;-BACKGROUND PICTURE
;////////////////////////////////////     
      MP_DrawSprite(Background, 0, 22); SHOW BACKGROUND PICTURE
      MP_SpriteSetZ(Background, 0)  ; 200 = Z INDEX
;////////////////////////////////////
;-SCANLINES OVERLAYER
;////////////////////////////////////     
      MP_DrawSprite(Scanlines, 0, 22); SHOW BACKGROUND PICTURE
      MP_SpriteSetZ(Scanlines, 0)    ; 0 = Z INDEX
      MP_SpriteBlendingMode(Scanlines, 4 , 6); SET BLEND MODE FOR SCANLINES
;////////////////////////////////////
;-FULLSCREEN BUTTON
;////////////////////////////////////     
      MP_DrawSprite(Fullscreen, 150, 290); SHOW BACKGROUND PICTURE
      MP_SpriteSetZ(Fullscreen, 0)      ; 2 = Z INDEX     
     
;////////////////////////////////////
 
  MP_Flip (); flip Buffers
;////////////////////////////////////
  If Not MP_DeviceStatus(0)
      MessageRequester("Error", "No Keyboard Found", 0);
         End
  EndIf
;////////////////////////////////////
;-PAUSE MUSIC
;////////////////////////////////////
      If EventGadget = #Music_Off
         SIDPause()
         SetGadgetColor(#Music_Resume , #PB_Gadget_FrontColor, RGB(17, 11, 33));TEXT Color
         HideGadget(#Music_Resume,0);Show button Music off
         HideGadget(#Music_Off,1)   ;Hide button Music on
      EndIf
       
     ;RESUME MUSIC FROM PAUSE
      If EventGadget = #Music_Resume
         SIDResume()       
         HideGadget(#Music_Resume,1);Hide button Music off
         HideGadget(#Music_Off,0)   ;Show button Music on
      EndIf

;////////////////////////////////////
;-DRAG TOOL WITH MOUSE
;////////////////////////////////////       
      Select Event
        Case #PB_Event_Gadget
         Case #WM_LBUTTONDOWN     
         SendMessage_(WindowID(#Wndw), #WM_NCLBUTTONDOWN, #HTCAPTION, 0)
      EndSelect
;////////////////////////////////////
;-EXIT BUTTON/ CLOSE TOOL
;////////////////////////////////////
      If Event=#PB_Event_Gadget
        If EventGadget()= #Gadget_exit
           
          End
        EndIf
      EndIf
     
Until Event = #PB_Event_CloseWindow:End


Vg

_________________
PureBasic v5.30 + v5.44 LTS + v5.62 | Windows 7 x64 - Gforce GTX 950 - AMD FX6200 Six Core 3.80 | 26GB RAM


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags: Re: MP3D Alpha 32
BeitragVerfasst: 01.06.2016 18:12 
Offline
Benutzeravatar

Registriert: 20.06.2013 23:27
EDIT:
Dank vollem Körpereinsatz von Bisonte :D haben wir beide das geschaukelt bekommen. Mit Grafik Text und MouseOver Effekt.

DAaaaanke :allright:

_________________
PureBasic v5.30 + v5.44 LTS + v5.62 | Windows 7 x64 - Gforce GTX 950 - AMD FX6200 Six Core 3.80 | 26GB RAM


Zuletzt geändert von udg am 01.07.2016 13:27, insgesamt 1-mal geändert.

Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags: Re: MP3D Alpha 32
BeitragVerfasst: 30.06.2016 16:05 
Offline
Benutzeravatar

Registriert: 20.06.2013 23:27
EQ darstellen möglich?
Hallo mpz,
Ich möchte fragen ob und wie es möglich ist, einen Equalizer darzustellen und eine real-time waveform mit einer "Line"? Welche zu mp3 und v2m Musik ausschlagen. Gibt es da ein code Beispiel?
Viele grüße

_________________
PureBasic v5.30 + v5.44 LTS + v5.62 | Windows 7 x64 - Gforce GTX 950 - AMD FX6200 Six Core 3.80 | 26GB RAM


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags: Re: MP3D Alpha 32
BeitragVerfasst: 30.06.2016 16:15 
Offline
Ein Admin
Benutzeravatar

Registriert: 29.08.2004 20:20
Wohnort: Saarbrücken
Meinst du zufällig einen Analyzer?

_________________
Freakscorner.de - Der Bastelkeller | Neustes Video: Neje DK - 1 Watt Laser Engraver
Ubuntu Gnome 18.04.1 LTS x64, PureBasic 5.60 x64 (außerdem 4.41, 4.50, 4.61, 5.00, 5.10, 5.11, 5.21, 5.22, 5.30, 5.31, 5.40, 5.50)
"Die deutsche Rechtschreibung ist Freeware, du darfst sie kostenlos nutzen – Aber sie ist nicht Open Source, d. h. du darfst sie nicht verändern oder in veränderter Form veröffentlichen."


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags: Re: MP3D Alpha 32
BeitragVerfasst: 30.06.2016 21:27 
Offline
Benutzeravatar

Registriert: 20.06.2013 23:27
NicTheQuick hat geschrieben:
Meinst du zufällig einen Analyzer?


Nicht wirklich einen Analyzer.

Das ganze soll mit der MP3D lib realisiert werden.
Der EQ oder die WaveForm soll lediglich optisch und visuell zur Musik ausschlagen.

Ich kann in der MP3D Lib zb. 3D Objekte zur Musik wobbeln lassen. Dies aber nur zu v2m Sounds und wüsste leider auch nicht, wie ich dies wie einen EQ aussehen lassen könnte.

Sieht dann so aus:

der Patch Button ist deaktiviert, kann also ohne Gefahr gedrückt werden.
Zum starten wird DirectX9c benötigt.

_________________
PureBasic v5.30 + v5.44 LTS + v5.62 | Windows 7 x64 - Gforce GTX 950 - AMD FX6200 Six Core 3.80 | 26GB RAM


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags: Re: MP3D Alpha 32
BeitragVerfasst: 01.07.2016 11:57 
Offline
Ein Admin
Benutzeravatar

Registriert: 29.08.2004 20:20
Wohnort: Saarbrücken
Ich kann das unter Linux eh nicht testen. Aber ein Equalizer zeigt nichts an, da kann man nur die verschiedenen Frequenzbänder einstellen um den Klang anzupassen. Ein Analyzer zeigt etwas an, wie du es möchtest. Aber es hätte ja auch sein können, dass du die Einstellungen des Equalizers optisch schön z.B. mit einer Bezier-Kurve anzeigen wolltest.

_________________
Freakscorner.de - Der Bastelkeller | Neustes Video: Neje DK - 1 Watt Laser Engraver
Ubuntu Gnome 18.04.1 LTS x64, PureBasic 5.60 x64 (außerdem 4.41, 4.50, 4.61, 5.00, 5.10, 5.11, 5.21, 5.22, 5.30, 5.31, 5.40, 5.50)
"Die deutsche Rechtschreibung ist Freeware, du darfst sie kostenlos nutzen – Aber sie ist nicht Open Source, d. h. du darfst sie nicht verändern oder in veränderter Form veröffentlichen."


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags: Re: MP3D Alpha 32
BeitragVerfasst: 01.07.2016 13:31 
Offline
Benutzeravatar

Registriert: 20.06.2013 23:27
NicTheQuick hat geschrieben:
Ein Analyzer zeigt etwas an, wie du es möchtest.

Hi,
Es geht lediglich darum, visuell anzuzeigen das Musik abgespielt wird :)

EDIT
Hab jetzt mal einen visuellen EQ geschrieben. Im Moment nur mit v2m möglich.

_________________
PureBasic v5.30 + v5.44 LTS + v5.62 | Windows 7 x64 - Gforce GTX 950 - AMD FX6200 Six Core 3.80 | 26GB RAM


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags: Re: MP3D Alpha 32
BeitragVerfasst: 04.07.2016 14:53 
Offline
Benutzeravatar

Registriert: 20.06.2013 23:27
Hab es jetzt mal so gelöst. leider unterstützt das Ganze nur v2m Sounds und liegt auch nur auf Z Index 0

Dropbox:
https://db.tt/meEOHpC1

_________________
PureBasic v5.30 + v5.44 LTS + v5.62 | Windows 7 x64 - Gforce GTX 950 - AMD FX6200 Six Core 3.80 | 26GB RAM


Nach oben
 Profil  
Mit Zitat antworten  
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen Auf das Thema antworten  [ 215 Beiträge ]  Gehe zu Seite Vorherige  1 ... 18, 19, 20, 21, 22  Nächste

Alle Zeiten sind UTC + 1 Stunde [ Sommerzeit ]


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 3 Gäste


Sie dürfen keine neuen Themen in diesem Forum erstellen.
Sie dürfen keine Antworten zu Themen in diesem Forum erstellen.
Sie dürfen Ihre Beiträge in diesem Forum nicht ändern.
Sie dürfen Ihre Beiträge in diesem Forum nicht löschen.

Suche nach:
Gehe zu:  
cron

 


Powered by phpBB © 2008 phpBB Group | Deutsche Übersetzung durch phpBB.de
subSilver+ theme by Canver Software, sponsor Sanal Modifiye