Search found 12 matches

by goldmate
Tue Mar 08, 2011 1:08 am
Forum: General Discussion
Topic: How to change my password in pb forum
Replies: 2
Views: 796

Re: How to change my password in pb forum

Thanks,solved
by goldmate
Mon Mar 07, 2011 2:10 pm
Forum: General Discussion
Topic: How to change my password in pb forum
Replies: 2
Views: 796

How to change my password in pb forum

Hi every one!
I don't know how to change password, please help.
by goldmate
Sat Feb 12, 2011 1:26 am
Forum: General Discussion
Topic: How to use a image as background of a sprite(solved)
Replies: 8
Views: 1191

Re: How to use a image as background of a sprite

Thanks, Solved this problem yesterday. Use sprite command for all images.
by goldmate
Fri Feb 11, 2011 12:41 pm
Forum: General Discussion
Topic: How to use a image as background of a sprite(solved)
Replies: 8
Views: 1191

Re: How to use a image as background of a sprite

Sorry,Here is common.pbi:
;- Window Constants
;
Enumeration
#Window_0
EndEnumeration

;- Gadget Constants
;
Enumeration
#Image_0
#Button_1
#Button_2
#Button_3
#Button_4
#Image_5
EndEnumeration

;- Image Plugins

;- Image Globals
Global Image0

;- Catch Images
Image0 = CatchImage(0, ?Image0 ...
by goldmate
Fri Feb 11, 2011 11:54 am
Forum: General Discussion
Topic: How to use a image as background of a sprite(solved)
Replies: 8
Views: 1191

Re: How to use a image as background of a sprite

This is a program to play chinesego, I hope to display chessman over a image drawing a Chessboard.
but background become pure black and see not chessboard after running the command of openwindowscreen.
by goldmate
Fri Feb 11, 2011 10:43 am
Forum: General Discussion
Topic: How to use a image as background of a sprite(solved)
Replies: 8
Views: 1191

Re: How to use a image as background of a sprite

Code :

UseJPEGImageDecoder()
IncludeFile "Common.pb"
Declare.b getcoord(x.w,y.w)
Declare pressgo(x.b,y.b)
Declare putoff(x.b,y.b)
steps.w=1
Define.b xindex=0,yindex=0
Dim qp.b(18,18)
Define thisx.w,thisy.w

; open window 0

open_window_0()

;SetClassLongPtr_(WindowID(#window_0), #GCL_HBRBACKGROUND ...
by goldmate
Fri Feb 11, 2011 5:10 am
Forum: General Discussion
Topic: How to use a image as background of a sprite(solved)
Replies: 8
Views: 1191

How to use a image as background of a sprite(solved)

Hello every one!
I use sprite operation over a image gadget in purebasic, but sprite background become pure black and see not background image after running the command of openwindowscreen.


How to do that I can display background image below the sprite.
by goldmate
Sun Feb 08, 2009 7:50 am
Forum: Coding Questions
Topic: Applied oop way by macro in purebasic
Replies: 2
Views: 1357

Polymorphism

I am not solve Polymorphism.
code:
class(test)
fun1()
member(test)
var1.l
endclass(test)

classext(extend)
fun2()
memberext(extend)
var2.s
endclass(extend)

Define method fun1 with para *this.
Fun1() must application to base class(test) and inherited class(extend) both.
Which is *this pointer ...
by goldmate
Sat Feb 07, 2009 8:43 am
Forum: Off Topic
Topic: Running speed compare between purebasic and powerbasic
Replies: 5
Views: 1279

It is only a sample,not a comprehensive compare.
I like purebasic more than powerbasic.
by goldmate
Sat Feb 07, 2009 5:46 am
Forum: Off Topic
Topic: Running speed compare between purebasic and powerbasic
Replies: 5
Views: 1279

debug mode is disable already
by goldmate
Sat Feb 07, 2009 4:20 am
Forum: Coding Questions
Topic: Applied oop way by macro in purebasic
Replies: 2
Views: 1357

Applied oop way by macro in purebasic

Hi,everyone
I'm sure have a applied oop way that use standard purebasic syntax in purebasic language.
My oop include code:
;OOP include file "Class.pbi"
;For Purebasic vesion 4.30+
;*********************************************************************
;Syntax:
;CLASS[EX](classname[,mothername ...
by goldmate
Sat Feb 07, 2009 3:24 am
Forum: Off Topic
Topic: Running speed compare between purebasic and powerbasic
Replies: 5
Views: 1279

Running speed compare between purebasic and powerbasic

purebasic code[4.30]:
timer.f=ElapsedMilliseconds()
k.l
For i.l=1 To 100000
For j.l=1 To 100000
k=i+j
Next j
Next i
MessageRequester(StrF(ElapsedMilliseconds()-timer),"")
End

purebasic cost 30.9 seconds
powerbasic cost 11.3 seconds with likely code

My computer:Intel duo core E4500
System ...