日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

psp中java,PSP编程概述

發布時間:2024/9/27 编程问答 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 psp中java,PSP编程概述 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

元旦準備買NDS,順帶關注了下PSP,其實是想,或許買PSP也不錯~

PSP很像一個平臺,提供了很多東西,譬如官方的PS模擬器~在上面編程也是個不錯的想法。

國外的一個網站提供了很多信息,PS2Dev Network (http://www.ps2dev.org),有教程http://ps2dev.org/psp/Tutorials,現在由于不久前的地震,基本無法登陸那個網站。更多的信息在http://wiki.ps2dev.org/。

要想進行PSP編程,需要學習C或C++。在windows下,需要安裝Cygwin http://www.cygwin.com/, 這其實是個模擬linux的環境。在Mac OS X或Linux下需要編譯PSPSDK和PSP 工具。這些東西都可以在http://ps2dev.org/psp/Projects找到。

--

starting?positions

for

the?character

?x

=

200

?y

=

100

--

A?nice?color

?color

=

Color.new(

128

,

255

,?0)

--

this?flag?tells?whether?the?program?needs?to?draw

?draw_character

=

true

--

loop?forever

while

true?do

if

draw_character?then

--

print

a?rogue?at?the?x

/

y?coordinates

?????screen:

print

(x,?y,

"

@

"

,?color)

?????screen.flip()

???end

--

check?whether?the?user?pressed?the?pad,

and

move?accordingly

???pad

=

Controls.read()

???draw_character

=

true

if

pad:left()?then

?????x

=

x

-

3

???elseif?pad:right()?then

?????x

=

x

+

3

???elseif?pad:up()?then

?????y

=

y

-

3

???elseif?pad:down()?then

?????y

=

y

+

3

else

?????draw_character

=

false

???end

--

wait

for

the?next?vertical?blank

???screen.waitVblankStart()

?end

你也可以使用HTML, CSS和JavaScript編寫程序在PSP的瀏覽器上運行。關于這方面的信息,網上已經很多了,這里給一個例子。

<

html

>

<

head

><

title

>

Mandelbrot?Set

title

>

head

>

<

body

style

="width:?480px;?height:?272px;"

>

<

script

language

="JavaScript"

>

?colors

=

new

Array(

"

black

"

,

"

aqua

"

,

"

blue

"

,

"

fuchsia

"

,

"

gray

"

,

"

green

"

,

"

lime

"

,

"

maroon

"

,

"

navy

"

,

"

olive

"

,

"

purple

"

,

"

red

"

,

"

silver

"

,

"

teal

"

,

"

white

"

,

"

yellow

"

);

function

plot()

{

???height

=

20

;

???width

=

150

;

???max

=

17

;

//

maximum?number?of?iterations.

???document.write('

<

p?style

=

"

font-size:?8px

"

>

');

//

imaginary?axis?from?-1.25?to?1.25

for

(y

=

-

1.25

;?y

<=

1.25

;?y

+=

2.5

/

height)

{

//

real?axis?from?-2.25?to?.75

for

(x

=

-

2.25

;?x

<=

.

75

;?x

+=

3

/

width)

{

???????a1

=

x;

???????b1

=

y;

for

(cnt

=

1

;?cnt

<=

max;?cnt

++

)

{

//

If?the?square?magnitude?of?the?complex?number?exceeds

//

the?limit,?break?out?of?the?loop.?Otherwise,?calculate

//

and?loop?around?again.

//

a

=

a1

*

a1;

?????????b

=

b1

*

b1;

if

(a

+

b

>

4.0

)

{

break

;

?????????}

else

{

???????????b1

=

2

*

a1

*

b1

+

y;

//

imaginary?component

a1

=

a

-

b

+

x;

//

real?component

}

???????}

if

(cnt

>

max)

{

//

At?this?resolution,?the?point?does?not?appear?to?be

//

outside?the?Mandelbrot?set,?so?use?color?0?(black).

cnt

=

0

;

???????}

???????style

=

'background

-

color:?'

+

colors[?cnt

%

16

]

+

';';

???????document.write('

<

span?style

=

"

'?+?style?+?'

"

>&

nbsp;

span

>

');

?????}

?????document.write('

<

br

/>

');

???}

???document.write('

p

>

');

?}

?plot();

script

>

body

>

html

>

你可以將其與Perl腳本語言結合,編寫功能更為強大的程序。

(聲明:以上大部分翻譯自《PSP Hacks》的Hack 47. Develop for the PSP)

不知道PSP是否支持Python這種腳本語言~大學里看過Python的書~

Lua是linux下的一種編程語言,那另一中語言Ruby是否也可以呢?

posted on 2006-12-30 14:11 李威 閱讀(2148) 評論(1) ?編輯 ?收藏

總結

以上是生活随笔為你收集整理的psp中java,PSP编程概述的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。