winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
July 2012
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
712 discussions
Start a n
N
ew thread
Jacek Caban : jscript: Properly set Error object's constructor property.
by Alexandre Julliard
16 Jul '12
16 Jul '12
Module: wine Branch: master Commit: 27747d3a755b8414be80cc84908851e02c992733 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=27747d3a755b8414be80cc849…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jul 16 15:31:37 2012 +0200 jscript: Properly set Error object's constructor property. --- dlls/jscript/error.c | 2 +- dlls/jscript/tests/lang.js | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletions(-) diff --git a/dlls/jscript/error.c b/dlls/jscript/error.c index aa948c6..5ff29fd 100644 --- a/dlls/jscript/error.c +++ b/dlls/jscript/error.c @@ -370,7 +370,7 @@ HRESULT init_error_constr(script_ctx_t *ctx, jsdisp_t *object_prototype) hres = jsdisp_propput_name(err, nameW, &v, NULL/*FIXME*/); if(SUCCEEDED(hres)) - hres = create_builtin_function(ctx, constr_val[i], names[i], NULL, + hres = create_builtin_constructor(ctx, constr_val[i], names[i], NULL, PROPF_CONSTR|1, err, constr_addr[i]); jsdisp_release(err); diff --git a/dlls/jscript/tests/lang.js b/dlls/jscript/tests/lang.js index a0eae4a..78e7782 100644 --- a/dlls/jscript/tests/lang.js +++ b/dlls/jscript/tests/lang.js @@ -104,6 +104,14 @@ testConstructor(RegExp, "RegExp"); testConstructor(Function, "Function"); testConstructor(Date, "Date"); testConstructor(VBArray, "VBArray"); +testConstructor(Error, "Error"); +testConstructor(EvalError, "EvalError"); +testConstructor(RangeError, "RangeError"); +testConstructor(ReferenceError, "ReferenceError"); +//testConstructor(RegExpError, "RegExpError"); +testConstructor(SyntaxError, "SyntaxError"); +testConstructor(TypeError, "TypeError"); +testConstructor(URIError, "URIError"); Function.prototype.test = true; ok(testFunc1.test === true, "testFunc1.test !== true");
1
0
0
0
Jacek Caban : jscript: Properly set Function constructor' s constructor property.
by Alexandre Julliard
16 Jul '12
16 Jul '12
Module: wine Branch: master Commit: bf7b7272ee130e7c6d793c3b87cbf932be8aff48 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bf7b7272ee130e7c6d793c3b8…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jul 16 15:31:24 2012 +0200 jscript: Properly set Function constructor's constructor property. --- dlls/jscript/function.c | 20 ++++++++++++++------ dlls/jscript/tests/lang.js | 2 +- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/dlls/jscript/function.c b/dlls/jscript/function.c index 765efcc..1d188e7 100644 --- a/dlls/jscript/function.c +++ b/dlls/jscript/function.c @@ -639,22 +639,28 @@ HRESULT create_builtin_function(script_ctx_t *ctx, builtin_invoke_t value_proc, return S_OK; } +static HRESULT set_constructor_prop(script_ctx_t *ctx, jsdisp_t *constr, jsdisp_t *prot) +{ + VARIANT v; + + static const WCHAR constructorW[] = {'c','o','n','s','t','r','u','c','t','o','r',0}; + + V_VT(&v) = VT_DISPATCH; + V_DISPATCH(&v) = to_disp(constr); + return jsdisp_propput_name(prot, constructorW, &v, NULL); +} + HRESULT create_builtin_constructor(script_ctx_t *ctx, builtin_invoke_t value_proc, const WCHAR *name, const builtin_info_t *builtin_info, DWORD flags, jsdisp_t *prototype, jsdisp_t **ret) { jsdisp_t *constr; - VARIANT v; HRESULT hres; - static const WCHAR constructorW[] = {'c','o','n','s','t','r','u','c','t','o','r',0}; - hres = create_builtin_function(ctx, value_proc, name, builtin_info, flags, prototype, &constr); if(FAILED(hres)) return hres; - V_VT(&v) = VT_DISPATCH; - V_DISPATCH(&v) = to_disp(constr); - hres = jsdisp_propput_name(prototype, constructorW, &v, NULL); + hres = set_constructor_prop(ctx, constr, prototype); if(FAILED(hres)) { jsdisp_release(constr); return hres; @@ -839,6 +845,8 @@ HRESULT init_function_constr(script_ctx_t *ctx, jsdisp_t *object_prototype) constr->value_proc = FunctionConstr_value; constr->name = FunctionW; hres = set_prototype(ctx, &constr->dispex, &prot->dispex); + if(SUCCEEDED(hres)) + hres = set_constructor_prop(ctx, &constr->dispex, &prot->dispex); if(FAILED(hres)) jsdisp_release(&constr->dispex); } diff --git a/dlls/jscript/tests/lang.js b/dlls/jscript/tests/lang.js index c37b7c7..a0eae4a 100644 --- a/dlls/jscript/tests/lang.js +++ b/dlls/jscript/tests/lang.js @@ -101,7 +101,7 @@ testConstructor(Array, "Array"); testConstructor(Boolean, "Boolean"); testConstructor(Number, "Number"); testConstructor(RegExp, "RegExp"); -//testConstructor(Function, "Function"); +testConstructor(Function, "Function"); testConstructor(Date, "Date"); testConstructor(VBArray, "VBArray");
1
0
0
0
Jacek Caban : jscript: Properly handle constructor property for most builtin constructors.
by Alexandre Julliard
16 Jul '12
16 Jul '12
Module: wine Branch: master Commit: d4926503322cce74258bee188e91200b09914d6f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d4926503322cce74258bee188…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jul 16 15:31:10 2012 +0200 jscript: Properly handle constructor property for most builtin constructors. --- dlls/jscript/array.c | 2 +- dlls/jscript/bool.c | 2 +- dlls/jscript/date.c | 2 +- dlls/jscript/object.c | 2 +- dlls/jscript/regexp.c | 2 +- dlls/jscript/string.c | 2 +- dlls/jscript/tests/lang.js | 14 +++++++++++++- dlls/jscript/vbarray.c | 2 +- 8 files changed, 20 insertions(+), 8 deletions(-) diff --git a/dlls/jscript/array.c b/dlls/jscript/array.c index 5004eb5..6881412 100644 --- a/dlls/jscript/array.c +++ b/dlls/jscript/array.c @@ -1183,7 +1183,7 @@ HRESULT create_array_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdis if(FAILED(hres)) return hres; - hres = create_builtin_function(ctx, ArrayConstr_value, ArrayW, NULL, PROPF_CONSTR|1, &array->dispex, ret); + hres = create_builtin_constructor(ctx, ArrayConstr_value, ArrayW, NULL, PROPF_CONSTR|1, &array->dispex, ret); jsdisp_release(&array->dispex); return hres; diff --git a/dlls/jscript/bool.c b/dlls/jscript/bool.c index 6ddcf9e..14bb1a3 100644 --- a/dlls/jscript/bool.c +++ b/dlls/jscript/bool.c @@ -190,7 +190,7 @@ HRESULT create_bool_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdisp if(FAILED(hres)) return hres; - hres = create_builtin_function(ctx, BoolConstr_value, BooleanW, NULL, + hres = create_builtin_constructor(ctx, BoolConstr_value, BooleanW, NULL, PROPF_CONSTR|1, &bool->dispex, ret); jsdisp_release(&bool->dispex); diff --git a/dlls/jscript/date.c b/dlls/jscript/date.c index 4dad1e2..465f7b2 100644 --- a/dlls/jscript/date.c +++ b/dlls/jscript/date.c @@ -2631,7 +2631,7 @@ HRESULT create_date_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdisp if(FAILED(hres)) return hres; - hres = create_builtin_function(ctx, DateConstr_value, DateW, &DateConstr_info, + hres = create_builtin_constructor(ctx, DateConstr_value, DateW, &DateConstr_info, PROPF_CONSTR|7, date, ret); jsdisp_release(date); diff --git a/dlls/jscript/object.c b/dlls/jscript/object.c index b1a83de..ce43eb5 100644 --- a/dlls/jscript/object.c +++ b/dlls/jscript/object.c @@ -264,7 +264,7 @@ HRESULT create_object_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdi { static const WCHAR ObjectW[] = {'O','b','j','e','c','t',0}; - return create_builtin_function(ctx, ObjectConstr_value, ObjectW, NULL, PROPF_CONSTR, + return create_builtin_constructor(ctx, ObjectConstr_value, ObjectW, NULL, PROPF_CONSTR, object_prototype, ret); } diff --git a/dlls/jscript/regexp.c b/dlls/jscript/regexp.c index 8e5445f..996f9f0 100644 --- a/dlls/jscript/regexp.c +++ b/dlls/jscript/regexp.c @@ -4143,7 +4143,7 @@ HRESULT create_regexp_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdi if(FAILED(hres)) return hres; - hres = create_builtin_function(ctx, RegExpConstr_value, RegExpW, &RegExpConstr_info, + hres = create_builtin_constructor(ctx, RegExpConstr_value, RegExpW, &RegExpConstr_info, PROPF_CONSTR|2, ®exp->dispex, ret); jsdisp_release(®exp->dispex); diff --git a/dlls/jscript/string.c b/dlls/jscript/string.c index 46d779a..9b23005 100644 --- a/dlls/jscript/string.c +++ b/dlls/jscript/string.c @@ -1669,7 +1669,7 @@ HRESULT create_string_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdi if(FAILED(hres)) return hres; - hres = create_builtin_function(ctx, StringConstr_value, StringW, &StringConstr_info, + hres = create_builtin_constructor(ctx, StringConstr_value, StringW, &StringConstr_info, PROPF_CONSTR|1, &string->dispex, ret); jsdisp_release(&string->dispex); diff --git a/dlls/jscript/tests/lang.js b/dlls/jscript/tests/lang.js index 75306f1..c37b7c7 100644 --- a/dlls/jscript/tests/lang.js +++ b/dlls/jscript/tests/lang.js @@ -91,7 +91,19 @@ ok(Function.prototype.prototype === undefined, "Function.prototype.prototype is ok(Date.prototype !== undefined, "Date.prototype is undefined"); ok(Date.prototype.prototype === undefined, "Date.prototype is not undefined"); -ok(Number.prototype.constructor === Number, "Number.prototype.constructor !== Number"); +function testConstructor(constr, name) { + ok(constr.prototype.constructor === constr, name + ".prototype.constructor !== " + name); +} + +testConstructor(Object, "Object"); +testConstructor(String, "String"); +testConstructor(Array, "Array"); +testConstructor(Boolean, "Boolean"); +testConstructor(Number, "Number"); +testConstructor(RegExp, "RegExp"); +//testConstructor(Function, "Function"); +testConstructor(Date, "Date"); +testConstructor(VBArray, "VBArray"); Function.prototype.test = true; ok(testFunc1.test === true, "testFunc1.test !== true"); diff --git a/dlls/jscript/vbarray.c b/dlls/jscript/vbarray.c index 87bdf88..ac0c6de 100644 --- a/dlls/jscript/vbarray.c +++ b/dlls/jscript/vbarray.c @@ -326,7 +326,7 @@ HRESULT create_vbarray_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsd if(FAILED(hres)) return hres; - hres = create_builtin_function(ctx, VBArrayConstr_value, VBArrayW, NULL, PROPF_CONSTR|1, &vbarray->dispex, ret); + hres = create_builtin_constructor(ctx, VBArrayConstr_value, VBArrayW, NULL, PROPF_CONSTR|1, &vbarray->dispex, ret); jsdisp_release(&vbarray->dispex); return hres;
1
0
0
0
Jacek Caban : jscript: Properly set Number.prototyp.constructor.
by Alexandre Julliard
16 Jul '12
16 Jul '12
Module: wine Branch: master Commit: cf8029717c85967abc787425e65ec8b43f896372 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cf8029717c85967abc787425e…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jul 16 15:30:54 2012 +0200 jscript: Properly set Number.prototyp.constructor. --- dlls/jscript/function.c | 25 +++++++++++++++++++++++++ dlls/jscript/jscript.h | 2 ++ dlls/jscript/number.c | 2 +- dlls/jscript/tests/lang.js | 2 ++ 4 files changed, 30 insertions(+), 1 deletions(-) diff --git a/dlls/jscript/function.c b/dlls/jscript/function.c index 618831b..765efcc 100644 --- a/dlls/jscript/function.c +++ b/dlls/jscript/function.c @@ -639,6 +639,31 @@ HRESULT create_builtin_function(script_ctx_t *ctx, builtin_invoke_t value_proc, return S_OK; } +HRESULT create_builtin_constructor(script_ctx_t *ctx, builtin_invoke_t value_proc, const WCHAR *name, + const builtin_info_t *builtin_info, DWORD flags, jsdisp_t *prototype, jsdisp_t **ret) +{ + jsdisp_t *constr; + VARIANT v; + HRESULT hres; + + static const WCHAR constructorW[] = {'c','o','n','s','t','r','u','c','t','o','r',0}; + + hres = create_builtin_function(ctx, value_proc, name, builtin_info, flags, prototype, &constr); + if(FAILED(hres)) + return hres; + + V_VT(&v) = VT_DISPATCH; + V_DISPATCH(&v) = to_disp(constr); + hres = jsdisp_propput_name(prototype, constructorW, &v, NULL); + if(FAILED(hres)) { + jsdisp_release(constr); + return hres; + } + + *ret = constr; + return S_OK; +} + HRESULT create_source_function(script_ctx_t *ctx, bytecode_t *code, function_code_t *func_code, scope_chain_t *scope_chain, jsdisp_t **ret) { diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h index 11b6ec9..ca91ee6 100644 --- a/dlls/jscript/jscript.h +++ b/dlls/jscript/jscript.h @@ -225,6 +225,8 @@ VARIANT_BOOL jsdisp_is_own_prop(jsdisp_t *obj, BSTR name) DECLSPEC_HIDDEN; HRESULT create_builtin_function(script_ctx_t*,builtin_invoke_t,const WCHAR*,const builtin_info_t*,DWORD, jsdisp_t*,jsdisp_t**) DECLSPEC_HIDDEN; +HRESULT create_builtin_constructor(script_ctx_t*,builtin_invoke_t,const WCHAR*,const builtin_info_t*,DWORD, + jsdisp_t*,jsdisp_t**) DECLSPEC_HIDDEN; HRESULT Function_value(script_ctx_t*,vdisp_t*,WORD,unsigned,VARIANT*,VARIANT*,jsexcept_t*) DECLSPEC_HIDDEN; HRESULT Function_invoke(jsdisp_t*,IDispatch*,WORD,unsigned,VARIANT*,VARIANT*,jsexcept_t*); diff --git a/dlls/jscript/number.c b/dlls/jscript/number.c index c62d985..d2de790 100644 --- a/dlls/jscript/number.c +++ b/dlls/jscript/number.c @@ -625,7 +625,7 @@ HRESULT create_number_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdi return hres; number->value = 0; - hres = create_builtin_function(ctx, NumberConstr_value, NumberW, NULL, + hres = create_builtin_constructor(ctx, NumberConstr_value, NumberW, NULL, PROPF_CONSTR|1, &number->dispex, ret); jsdisp_release(&number->dispex); diff --git a/dlls/jscript/tests/lang.js b/dlls/jscript/tests/lang.js index 308e0c9..75306f1 100644 --- a/dlls/jscript/tests/lang.js +++ b/dlls/jscript/tests/lang.js @@ -91,6 +91,8 @@ ok(Function.prototype.prototype === undefined, "Function.prototype.prototype is ok(Date.prototype !== undefined, "Date.prototype is undefined"); ok(Date.prototype.prototype === undefined, "Date.prototype is not undefined"); +ok(Number.prototype.constructor === Number, "Number.prototype.constructor !== Number"); + Function.prototype.test = true; ok(testFunc1.test === true, "testFunc1.test !== true"); ok(Function.test === true, "Function.test !== true");
1
0
0
0
Nozomi Kodama : d3dx9_36: Implementation of D3DXSHEvalDirection.
by Alexandre Julliard
16 Jul '12
16 Jul '12
Module: wine Branch: master Commit: c957f8a921154c293f1dda53595f45a396477d1f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c957f8a921154c293f1dda535…
Author: Nozomi Kodama <Nozomi.Kodama(a)yahoo.com> Date: Sun Jul 15 10:18:50 2012 +0200 d3dx9_36: Implementation of D3DXSHEvalDirection. --- dlls/d3dx9_36/d3dx9_36.spec | 2 +- dlls/d3dx9_36/math.c | 60 +++++++++++++++++++++++++++++++++++++++++++ dlls/d3dx9_36/tests/math.c | 37 ++++++++++++++++++++++++++ include/d3dx9math.h | 1 + 4 files changed, 99 insertions(+), 1 deletions(-) diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec index 9230d55..b59c8a9 100644 --- a/dlls/d3dx9_36/d3dx9_36.spec +++ b/dlls/d3dx9_36/d3dx9_36.spec @@ -275,7 +275,7 @@ @ stdcall D3DXSHAdd(ptr long ptr ptr) @ stdcall D3DXSHDot(long ptr ptr) @ stub D3DXSHEvalConeLight(long ptr long long long long ptr ptr ptr) -@ stub D3DXSHEvalDirection(ptr long ptr) +@ stdcall D3DXSHEvalDirection(ptr long ptr) @ stub D3DXSHEvalDirectionalLight(long ptr long long long long ptr ptr ptr) @ stub D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) @ stub D3DXSHEvalSphericalLight(long ptr long long long long ptr ptr ptr) diff --git a/dlls/d3dx9_36/math.c b/dlls/d3dx9_36/math.c index 79a0bca..89a19af 100644 --- a/dlls/d3dx9_36/math.c +++ b/dlls/d3dx9_36/math.c @@ -1995,6 +1995,66 @@ FLOAT WINAPI D3DXSHDot(UINT order, CONST FLOAT *a, CONST FLOAT *b) return s; } +FLOAT* WINAPI D3DXSHEvalDirection(FLOAT *out, UINT order, CONST D3DXVECTOR3 *dir) +{ + + TRACE("(%p, %u, %p)\n", out, order, dir); + + if ( (order < D3DXSH_MINORDER) || (order > D3DXSH_MAXORDER) ) + return out; + + out[0] = 0.5f / sqrt(D3DX_PI); + out[1] = -0.5f / sqrt(D3DX_PI / 3.0f) * dir->y; + out[2] = 0.5f / sqrt(D3DX_PI / 3.0f) * dir->z; + out[3] = -0.5f / sqrt(D3DX_PI / 3.0f) * dir->x; + if ( order == 2 ) + return out; + + out[4] = 0.5f / sqrt(D3DX_PI / 15.0f) * dir->x * dir->y; + out[5] = -0.5f / sqrt(D3DX_PI / 15.0f) * dir->y * dir->z; + out[6] = 0.25f / sqrt(D3DX_PI / 5.0f) * ( 3.0f * dir->z * dir->z - 1.0f ); + out[7] = -0.5f / sqrt(D3DX_PI / 15.0f) * dir->x * dir->z; + out[8] = 0.25f / sqrt(D3DX_PI / 15.0f) * ( dir->x * dir->x - dir->y * dir->y ); + if ( order == 3 ) + return out; + + out[9] = -sqrt(70.0f / D3DX_PI) / 8.0f * dir->y * (3.0f * dir->x * dir->x - dir->y * dir->y ); + out[10] = sqrt(105.0f / D3DX_PI) / 2.0f * dir->x * dir->y * dir->z; + out[11] = -sqrt(42.0 / D3DX_PI) / 8.0f * dir->y * ( -1.0f + 5.0f * dir->z * dir->z ); + out[12] = sqrt(7.0f / D3DX_PI) / 4.0f * dir->z * ( 5.0f * dir->z * dir->z - 3.0f ); + out[13] = sqrt(42.0 / D3DX_PI) / 8.0f * dir->x * ( 1.0f - 5.0f * dir->z * dir->z ); + out[14] = sqrt(105.0f / D3DX_PI) / 4.0f * dir->z * ( dir->x * dir->x - dir->y * dir->y ); + out[15] = -sqrt(70.0f / D3DX_PI) / 8.0f * dir->x * ( dir->x * dir->x - 3.0f * dir->y * dir->y ); + if ( order == 4 ) + return out; + + out[16] = 0.75f * sqrt(35.0f / D3DX_PI) * dir->x * dir->y * (dir->x * dir->x - dir->y * dir->y ); + out[17] = 3.0f * dir->z * out[9]; + out[18] = 0.75f * sqrt(5.0f / D3DX_PI) * dir->x * dir->y * ( 7.0f * dir->z * dir->z - 1.0f ); + out[19] = 0.375f * sqrt(10.0f / D3DX_PI) * dir->y * dir->z * ( 3.0f - 7.0f * dir->z * dir->z ); + out[20] = 3.0f / ( 16.0f * sqrt(D3DX_PI) ) * ( 35.0f * dir->z * dir->z * dir->z * dir->z - 30.f * dir->z * dir->z + 3.0f ); + out[21] = 0.375f * sqrt(10.0f / D3DX_PI) * dir->x * dir->z * ( 3.0f - 7.0f * dir->z * dir->z ); + out[22] = 0.375f * sqrt(5.0f / D3DX_PI) * ( dir->x * dir->x - dir->y * dir->y ) * ( 7.0f * dir->z * dir->z - 1.0f); + out[23] = 3.0 * dir->z * out[15]; + out[24] = 3.0f / 16.0f * sqrt(35.0f / D3DX_PI) * ( dir->x * dir->x * dir->x * dir->x- 6.0f * dir->x * dir->x * dir->y * dir->y + dir->y * dir->y * dir->y * dir->y ); + if ( order == 5 ) + return out; + + out[25] = -3.0f/ 32.0f * sqrt(154.0f / D3DX_PI) * dir->y * ( 5.0f * dir->x * dir->x * dir->x * dir->x - 10.0f * dir->x * dir->x * dir->y * dir->y + dir->y * dir->y * dir->y * dir->y ); + out[26] = 0.75f * sqrt(385.0f / D3DX_PI) * dir->x * dir->y * dir->z * ( dir->x * dir->x - dir->y * dir->y ); + out[27] = sqrt(770.0f / D3DX_PI) / 32.0f * dir->y * ( 3.0f * dir->x * dir->x - dir->y * dir->y ) * ( 1.0f - 9.0f * dir->z * dir->z ); + out[28] = sqrt(1155.0f / D3DX_PI) / 4.0f * dir->x * dir->y * dir->z * ( 3.0f * dir->z * dir->z - 1.0f); + out[29] = sqrt(165.0f / D3DX_PI) / 16.0f * dir->y * ( 14.0f * dir->z * dir->z - 21.0f * dir->z * dir->z * dir->z * dir->z - 1.0f ); + out[30] = sqrt(11.0f / D3DX_PI) / 16.0f * dir->z * ( 63.0f * dir->z * dir->z * dir->z * dir->z - 70.0f * dir->z * dir->z + 15.0f ); + out[31] = sqrt(165.0f / D3DX_PI) / 16.0f * dir->x * ( 14.0f * dir->z * dir->z - 21.0f * dir->z * dir->z * dir->z * dir->z - 1.0f ); + out[32] = sqrt(1155.0f / D3DX_PI) / 8.0f * dir->z * ( dir->x * dir->x - dir->y * dir->y ) * ( 3.0f * dir->z * dir->z - 1.0f ); + out[33] = sqrt(770.0f / D3DX_PI) / 32.0f * dir->x * ( dir->x * dir->x - 3.0f * dir->y * dir->y ) * ( 1.0f - 9.0f * dir->z * dir->z ); + out[34] = 3.0f / 16.0f * sqrt(385.0f / D3DX_PI) * dir->z * ( dir->x * dir->x * dir->x * dir->x - 6.0 * dir->x * dir->x * dir->y * dir->y + dir->y * dir->y * dir->y * dir->y ); + out[35] = -3.0f/ 32.0f * sqrt(154.0f / D3DX_PI) * dir->x * ( dir->x * dir->x * dir->x * dir->x - 10.0f * dir->x * dir->x * dir->y * dir->y + 5.0f * dir->y * dir->y * dir->y * dir->y ); + + return out; +} + FLOAT* WINAPI D3DXSHMultiply2(FLOAT *out, CONST FLOAT *a, CONST FLOAT *b) { FLOAT ta, tb; diff --git a/dlls/d3dx9_36/tests/math.c b/dlls/d3dx9_36/tests/math.c index 66d4689..fecb413 100644 --- a/dlls/d3dx9_36/tests/math.c +++ b/dlls/d3dx9_36/tests/math.c @@ -2422,6 +2422,42 @@ static void test_D3DXSHDot(void) return; } +static void test_D3DXSHEvalDirection(void) +{ + unsigned int i, order; + D3DXVECTOR3 d; + FLOAT a[100], expected[100], *received_ptr; + CONST FLOAT table[36] = + { 0.282095f, -0.977205f, 1.465808f, -0.488603f, 2.185097f, -6.555291f, + 8.200181f, -3.277646f, -1.638823f, 1.180087f, 17.343668f, -40.220032f, + 47.020218f, -20.110016f, -13.007751f, 6.490479f, -15.020058f, 10.620785f, + 117.325661f, -240.856750f, 271.657288f, -120.428375f, -87.994247f, 58.414314f, + -4.380850f, 24.942520f, -149.447693f, 78.278130f, 747.791748f, -1427.687866f, + 1574.619141, -713.843933f, -560.843811f, 430.529724, -43.588909, -26.911665, }; + + d.x = 1.0; d.y = 2.0f; d.z = 3.0f; + + for(order = 0; order < 10; order++) + { + for(i = 0; i < 100; i++) + a[i] = 1.5f + i; + + received_ptr = D3DXSHEvalDirection(a, order, &d); + ok(received_ptr == a, "Expected %p, received %p\n", a, received_ptr); + + for(i = 0; i < 100; i++) + { + /* if the order is < D3DXSH_MINORDER or order > D3DXSH_MAXORDER or the index of the element is greater than order * order - 1, D3DXSHEvalDirection does not modify the output */ + if ( (order < D3DXSH_MINORDER) || (order > D3DXSH_MAXORDER) || (i >= order * order) ) + expected[i] = 1.5f + i; + else + expected[i] = table[i]; + + ok(relative_error(a[i], expected[i]) < admitted_error, "order %u, index %u: expected %f, received %f\n", order, i, expected[i], a[i]); + } + } +} + static void test_D3DXSHMultiply2(void) { unsigned int i; @@ -2512,6 +2548,7 @@ START_TEST(math) test_D3DXFloat_Array(); test_D3DXSHAdd(); test_D3DXSHDot(); + test_D3DXSHEvalDirection(); test_D3DXSHMultiply2(); test_D3DXSHMultiply3(); test_D3DXSHScale(); diff --git a/include/d3dx9math.h b/include/d3dx9math.h index ab3e2b0..602c2a4 100644 --- a/include/d3dx9math.h +++ b/include/d3dx9math.h @@ -379,6 +379,7 @@ FLOAT *WINAPI D3DXFloat16To32Array(FLOAT *pout, CONST D3DXFLOAT16 *pin, UINT n); FLOAT* WINAPI D3DXSHAdd(FLOAT *out, UINT order, CONST FLOAT *a, CONST FLOAT *b); FLOAT WINAPI D3DXSHDot(UINT order, CONST FLOAT *a, CONST FLOAT *b); +FLOAT* WINAPI D3DXSHEvalDirection(FLOAT *out, UINT order, CONST D3DXVECTOR3 *dir); FLOAT* WINAPI D3DXSHMultiply2(FLOAT *out, CONST FLOAT *a, CONST FLOAT *b); FLOAT* WINAPI D3DXSHMultiply3(FLOAT *out, CONST FLOAT *a, CONST FLOAT *b); FLOAT* WINAPI D3DXSHScale(FLOAT *out, UINT order, CONST FLOAT *a, CONST FLOAT scale);
1
0
0
0
Alexandre Julliard : opengl32: Mark invalid handles with ffff instead of 0.
by Alexandre Julliard
16 Jul '12
16 Jul '12
Module: wine Branch: master Commit: 8b97ff3278d98e1b9db55a028cc902f5b690c02a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8b97ff3278d98e1b9db55a028…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jul 16 14:50:01 2012 +0200 opengl32: Mark invalid handles with ffff instead of 0. --- dlls/opengl32/wgl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c index 815dc42..4545cfa 100644 --- a/dlls/opengl32/wgl.c +++ b/dlls/opengl32/wgl.c @@ -164,7 +164,7 @@ static HGLRC alloc_handle( struct wgl_context *context, const struct wgl_funcs * static void free_handle_ptr( struct wgl_handle *ptr ) { - ptr->handle &= ~0xffff; + ptr->handle |= 0xffff; ptr->context = (struct wgl_context *)next_free; ptr->funcs = NULL; next_free = ptr;
1
0
0
0
Dmitry Timoshkov : windowscodecs: Use predefined WICBitmapPaletteTypeFixedBW palette instead of a hand-made one .
by Alexandre Julliard
16 Jul '12
16 Jul '12
Module: wine Branch: master Commit: a0f9a251f94ef21b5af63d01f9120f30a71e8c22 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a0f9a251f94ef21b5af63d01f…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Jul 16 14:54:32 2012 +0900 windowscodecs: Use predefined WICBitmapPaletteTypeFixedBW palette instead of a hand-made one. --- dlls/windowscodecs/converter.c | 23 +++++++++-------------- 1 files changed, 9 insertions(+), 14 deletions(-) diff --git a/dlls/windowscodecs/converter.c b/dlls/windowscodecs/converter.c index 98e727e..6ee3a16 100644 --- a/dlls/windowscodecs/converter.c +++ b/dlls/windowscodecs/converter.c @@ -103,24 +103,19 @@ static HRESULT copypixels_to_32bppBGRA(struct FormatConverter *This, const WICRe IWICPalette *palette; UINT actualcolors; - if (source_format == format_1bppIndexed) - { - res = PaletteImpl_Create(&palette); - if (FAILED(res)) return res; + res = PaletteImpl_Create(&palette); + if (FAILED(res)) return res; + if (source_format == format_1bppIndexed) res = IWICBitmapSource_CopyPalette(This->source, palette); - if (SUCCEEDED(res)) - res = IWICPalette_GetColors(palette, 2, colors, &actualcolors); + else + res = IWICPalette_InitializePredefined(palette, WICBitmapPaletteTypeFixedBW, FALSE); - IWICPalette_Release(palette); + if (SUCCEEDED(res)) + res = IWICPalette_GetColors(palette, 2, colors, &actualcolors); - if (FAILED(res)) return res; - } - else - { - colors[0] = 0xff000000; - colors[1] = 0xffffffff; - } + IWICPalette_Release(palette); + if (FAILED(res)) return res; srcstride = (prc->Width+7)/8; srcdatasize = srcstride * prc->Height;
1
0
0
0
Dmitry Timoshkov : windowscodecs: Avoid casting IWICFormatConverter to IWICBitmapSource.
by Alexandre Julliard
16 Jul '12
16 Jul '12
Module: wine Branch: master Commit: a9d0f8976ca0d057f0f76adc578e7b9512413c44 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a9d0f8976ca0d057f0f76adc5…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Jul 16 14:53:44 2012 +0900 windowscodecs: Avoid casting IWICFormatConverter to IWICBitmapSource. --- dlls/windowscodecs/info.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/windowscodecs/info.c b/dlls/windowscodecs/info.c index f1eaf4c..9531198 100644 --- a/dlls/windowscodecs/info.c +++ b/dlls/windowscodecs/info.c @@ -2181,8 +2181,9 @@ HRESULT WINAPI WICConvertBitmapSource(REFWICPixelFormatGUID dstFormat, IWICBitma if (converter) { - *ppIDst = (IWICBitmapSource*)converter; - return S_OK; + res = IWICFormatConverter_QueryInterface(converter, &IID_IWICBitmapSource, (void **)ppIDst); + IWICFormatConverter_Release(converter); + return res; } else {
1
0
0
0
Nikolay Sivov : msxml3: Implement a common way to store and get callback interface pointers.
by Alexandre Julliard
16 Jul '12
16 Jul '12
Module: wine Branch: master Commit: 33a1f892b80df9ee4fddaa9a094aa2aba9c40dad URL:
http://source.winehq.org/git/wine.git/?a=commit;h=33a1f892b80df9ee4fddaa9a0…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun Jul 15 00:36:54 2012 +0400 msxml3: Implement a common way to store and get callback interface pointers. --- dlls/msxml3/saxreader.c | 533 +++++++++++++++------------------------- dlls/msxml3/tests/saxreader.c | 12 + 2 files changed, 212 insertions(+), 333 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=33a1f892b80df9ee4fdda…
1
0
0
0
Nikolay Sivov : msxml3: Implement put/ get for DTD handler callback interface.
by Alexandre Julliard
16 Jul '12
16 Jul '12
Module: wine Branch: master Commit: 2bff764df07e7c9830299f0e0b1d14f4d334f8bb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2bff764df07e7c9830299f0e0…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Jul 14 23:05:34 2012 +0400 msxml3: Implement put/get for DTD handler callback interface. --- dlls/msxml3/saxreader.c | 61 +++++++++++++++++++++++++++++++++++++--------- 1 files changed, 49 insertions(+), 12 deletions(-) diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c index 485644a..1125d1c 100644 --- a/dlls/msxml3/saxreader.c +++ b/dlls/msxml3/saxreader.c @@ -177,6 +177,8 @@ typedef struct IVBSAXLexicalHandler *vblexicalHandler; ISAXDeclHandler *declHandler; IVBSAXDeclHandler *vbdeclHandler; + ISAXDTDHandler *dtdHandler; + IVBSAXDTDHandler *vbdtdHandler; xmlSAXHandler sax; BOOL isParsing; struct bstrpool pool; @@ -2358,22 +2360,49 @@ static HRESULT internal_putContentHandler( return S_OK; } -static HRESULT internal_getDTDHandler( - saxreader* This, - void *pDTDHandler, - BOOL vbInterface) +static HRESULT internal_getDTDHandler(saxreader* This, void *dtdHandler, BOOL vbInterface) { - FIXME("(%p)->(%p) stub\n", This, pDTDHandler); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, dtdHandler); + + if (!dtdHandler) return E_POINTER; + + if ((vbInterface && This->vbdtdHandler) || (!vbInterface && This->dtdHandler)) + { + if (vbInterface) + IVBSAXContentHandler_AddRef(This->vbdtdHandler); + else + ISAXContentHandler_AddRef(This->dtdHandler); + } + if (vbInterface) *(IVBSAXDTDHandler**)dtdHandler = This->vbdtdHandler; + else *(ISAXDTDHandler**)dtdHandler = This->dtdHandler; + + return S_OK; } -static HRESULT internal_putDTDHandler( - saxreader* This, - void *pDTDHandler, - BOOL vbInterface) +static HRESULT internal_putDTDHandler(saxreader* This, void *dtdHandler, BOOL vbInterface) { - FIXME("(%p)->(%p) stub\n", This, pDTDHandler); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, dtdHandler); + + if (dtdHandler) + { + if (vbInterface) + IVBSAXDTDHandler_AddRef((IVBSAXDTDHandler*)dtdHandler); + else + ISAXDTDHandler_AddRef((ISAXDTDHandler*)dtdHandler); + } + if ((vbInterface && This->vbdtdHandler) || (!vbInterface && This->dtdHandler)) + { + if (vbInterface) + IVBSAXDTDHandler_Release(This->vbdtdHandler); + else + ISAXDTDHandler_Release(This->dtdHandler); + } + if (vbInterface) + This->vbdtdHandler = dtdHandler; + else + This->dtdHandler = dtdHandler; + + return S_OK; } static HRESULT internal_getErrorHandler( @@ -2809,6 +2838,12 @@ static ULONG WINAPI saxxmlreader_Release( if(This->vbdeclHandler) IVBSAXDeclHandler_Release(This->vbdeclHandler); + if(This->dtdHandler) + ISAXDTDHandler_Release(This->dtdHandler); + + if(This->vbdtdHandler) + IVBSAXDTDHandler_Release(This->vbdtdHandler); + free_bstr_pool(&This->pool); release_dispex(&This->dispex); @@ -3306,6 +3341,8 @@ HRESULT SAXXMLReader_create(MSXML_VERSION version, IUnknown *outer, LPVOID *ppOb reader->vblexicalHandler = NULL; reader->declHandler = NULL; reader->vbdeclHandler = NULL; + reader->dtdHandler = NULL; + reader->vbdtdHandler = NULL; reader->isParsing = FALSE; reader->pool.pool = NULL; reader->pool.index = 0;
1
0
0
0
← Newer
1
...
39
40
41
42
43
44
45
...
72
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Results per page:
10
25
50
100
200