/*
 * : Radio Stations' Icons v1.0
 * : Prographer (aka PrographerMan)
 * : prographerman@gmail.com
 * :        .
 *
 * :     Cleo 3;
                "radio.txd"   "/models/";
                "radioStation.cs"   "/Cleo/";
 *
 *  :   ,     ()  ,    .
*/

{$CLEO}
0000:
thread 'radSt'
wait 0

05E0: 3@ = read_memory 0xA0FD04 size 4 virtual_protect 0 //  
0014: 3@ /= 2 
008D: 3@ = integer_to_float 3@ //     float

4@ = 150.0  //  
5@ = 150.0  //   
6@ = 0      //        ()
6@ -= 100

// 0x6CD9C8 -    
05DF: write_memory 0x6CD9C8 size 4 value 6@ virtual_protect 0 //   

:draw
    wait 0
    
    //  
    03F0: enable_text_draw 1         
    0390: load_txd_dictionary 'radio'
    038F: load_texture 'wild' as  1
    038F: load_texture 'flash' as 2
    038F: load_texture 'kchat' as 3
    038F: load_texture 'fever' as 4
    038F: load_texture 'vrock' as 5
    038F: load_texture 'vcpr' as  6
    038F: load_texture 'espan' as 7
    038F: load_texture 'emoti' as 8
    038F: load_texture 'wave' as  9
    
    03E3: set_texture_to_be_drawn_antialiased 1  // ?
    
    repeat
        wait 0
    until 00E0: player $PLAYER_CHAR driving 
    
    03C1: 0@ = player $PLAYER_CHAR car_no_save
    05E7: 1@ = car 0@ struct
    1@ += 0x23C //  
    
    05E0: 2@ = read_memory 1@ size 1 virtual_protect 0
    
    if and 
        Player.Defined($PLAYER_CHAR)
        8112: not wasted_or_busted
    jf @draw                          
    
    while Actor.Driving($PLAYER_ACTOR)
        wait 0
        05E0: 2@ = read_memory 1@ size 1 virtual_protect 0
        
        if
        2@ == 0
            then
                while 2@ == 0
                    wait 0
                    
                    if Actor.Driving($PLAYER_ACTOR)
                    jf @draw
                    
                    if 8112: not wasted_or_busted
                    jf @draw
                    
                    05E0: 2@ = read_memory 1@ size 1 virtual_protect 0 
                    038D: draw_texture 1 position 3@ 75.0 scale 4@ 5@ RGBA 255 255 255 200
                end
            else if
            2@ == 1
                then
                    while 2@ == 1
                        wait 0
                        
                        if Actor.Driving($PLAYER_ACTOR)
                        jf @draw
                        
                        if 8112: not wasted_or_busted
                        jf @draw
                        
                        05E0: 2@ = read_memory 1@ size 1 virtual_protect 0 
                        038D: draw_texture 2 position 3@ 75.0 scale 4@ 5@ RGBA 255 255 255 200
                    end
                else if
                2@ == 2
                    then
                        while 2@ == 2
                            wait 0
                            
                            if Actor.Driving($PLAYER_ACTOR)
                            jf @draw
                            
                            if 8112: not wasted_or_busted
                            jf @draw
                            
                            05E0: 2@ = read_memory 1@ size 1 virtual_protect 0 
                            038D: draw_texture 3 position 3@ 75.0 scale 4@ 5@ RGBA 255 255 255 200
                        end
                    else if
                    2@ == 3
                        then
                            while 2@ == 3
                                wait 0
                                
                                if Actor.Driving($PLAYER_ACTOR)
                                jf @draw
                                
                                if 8112: not wasted_or_busted
                                jf @draw
                                
                                05E0: 2@ = read_memory 1@ size 1 virtual_protect 0 
                                038D: draw_texture 4 position 3@ 75.0 scale 4@ 5@ RGBA 255 255 255 200
                            end
                        else if
                        2@ == 4
                            then
                                while 2@ == 4
                                    wait 0
                                    
                                    if Actor.Driving($PLAYER_ACTOR)
                                    jf @draw
                                    
                                    if 8112: not wasted_or_busted
                                    jf @draw
                                    
                                    05E0: 2@ = read_memory 1@ size 1 virtual_protect 0 
                                    038D: draw_texture 5 position 3@ 75.0 scale 4@ 5@ RGBA 255 255 255 200
                                end
                            else if
                            2@ == 5
                                then
                                    while 2@ == 5
                                        wait 0
                                        
                                        if Actor.Driving($PLAYER_ACTOR)
                                        jf @draw
                                        
                                        if 8112: not wasted_or_busted
                                        jf @draw
                                        
                                        05E0: 2@ = read_memory 1@ size 1 virtual_protect 0 
                                        038D: draw_texture 6 position 3@ 75.0 scale 4@ 5@ RGBA 255 255 255 200
                                    end     
                                else if
                                2@ == 6
                                    then
                                        while 2@ == 6
                                            wait 0
                                            
                                            if Actor.Driving($PLAYER_ACTOR)
                                            jf @draw
                                            
                                            if 8112: not wasted_or_busted
                                            jf @draw
                                            
                                            05E0: 2@ = read_memory 1@ size 1 virtual_protect 0 
                                            038D: draw_texture 7 position 3@ 75.0 scale 4@ 5@ RGBA 255 255 255 200
                                        end
                                    else if
                                    2@ == 7
                                        then
                                            while 2@ == 7
                                                wait 0
                                                
                                                if Actor.Driving($PLAYER_ACTOR)
                                                jf @draw
                                                
                                                if 8112: not wasted_or_busted
                                                jf @draw
                                                
                                                05E0: 2@ = read_memory 1@ size 1 virtual_protect 0 
                                                038D: draw_texture 8 position 3@ 75.0 scale 4@ 5@ RGBA 255 255 255 200
                                            end
                                        else if
                                        2@ == 8
                                            then
                                                while 2@ == 8
                                                    wait 0
                                                    
                                                    if Actor.Driving($PLAYER_ACTOR)
                                                    jf @draw
                                                    
                                                    if 8112: not wasted_or_busted
                                                    jf @draw
                                                    
                                                    05E0: 2@ = read_memory 1@ size 1 virtual_protect 0 
                                                    038D: draw_texture 9 position 3@ 75.0 scale 4@ 5@ RGBA 255 255 255 200
                                                end
                                            end
                                        end
                                    end
                                end            
                            end                
                        end       
                    end
                end
            end
        end
jump @draw
end_thread